Install Oracle Restart 12c

Installed Versions

  • Oracle Restart 12c
  • Database 11.2.0.4

Verify Oracle Restart host cluvfy

[oracle@orars12 ~]$  cluvfy stage -pre  hacfg -verbose
Performing pre-checks for Oracle Restart configuration 
Total memory check failed
Check failed on nodes: 
    orars12
Available memory check passed
Swap space check passed
Free disk space check passed for "orars12:/usr,orars12:/var,orars12:/etc,orars12:/sbin,orars12:/tmp"
...

Software  and ASM disk locations

/u01/app/oraInventory             --> Inventory 
/u01/app/1202/grid                --> GRID_HOME     Version 12.1.0.2
/u01/app/oracle/product/11204/ors --> ORACLE_HOME
/u01/app/oracle                   --> ORACLE_BASE   Version 11.2.0.4 

ASM Disk protection: 
# ls -l  /dev/asm_data_10g_disk1
brw-rw----. 1 oracle oinstall 8, 17 Sep  5 15:41 /dev/asm_data_10g_disk1

Install 12c Oracle Grid Infracstructure for a Standalone Server

[oracle@orars12 grid]$ ./runInstaller
-->  Install and confgure Oracle Grid Infr. for a Standalone Server 
  --> Create ASM device : DG DATA 
..
[root@orars12 app]# /u01/app/1202/grid/root.sh
Performing root user operation.
....
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/1202/grid/crs/install/crsconfig_params
LOCAL ADD MODE 
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node orars12 successfully pinned.
2014/09/05 16:27:35 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'
orars12     2014/09/05 16:30:05     /u01/app/1202/grid/cdata/orars12/backup_20140905_163005.olr     0     
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'orars12'
CRS-2673: Attempting to stop 'ora.evmd' on 'orars12'
CRS-2677: Stop of 'ora.evmd' on 'orars12' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'orars12' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2014/09/05 16:32:49 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Start and stop HAS resources

[root@orars12 bin]# crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  

Start and stop Oracle HAS 
[root@orars12 bin]#  crsctl stop has
[root@orars12 bin]#  crsctl start has

Install 11.2..0.4 db software

--> Select Oracle Database Software only

Run dbca: 
  --> Select ASM : +DATA DG

Check resources
[oracle@orars12 ~]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.ors4.db                    1   ONLINE       ONLINE       orars12         Open,STABLE 
--> ors4 db resource is now managed by Oracle Restart 

Testing Oracle Restart

Kill instance 
[oracle@orars12 ~]$  ps -elf | grep smon
0 S oracle   19321     1  0  80   0 - 358931 semtim 08:57 ?       00:00:00 asm_smon_+ASM
0 S oracle   26884     1  0  80   0 - 217412 semtim 10:32 ?       00:00:00 ora_smon_ORS4
[oracle@orars12 ~]$ kill -9 26884

--> Note DB restarts very quickly 
Monitor ora.ors4.db resource :
Status change from
ora.ors4.db                    1   ONLINE    OFFLINE      orars12         Instance Shutdown,STARTING
to 
ora.ors4.db                    1   ONLINE    ONLINE       orars12         Open,STABLE

Recreate resources

1) Recreate ora.LISTENER.lsnr 
[oracle@orars12 ~]$  srvctl config listener
Name: LISTENER
Type: Database Listener
Home: /u01/app/1202/grid
End points: TCP:1521
Listener is enabled.
[oracle@orars12 ~]$ srvctl stop listener
[oracle@orars12 ~]$ srvctl remove listener
[oracle@orars12 ~]$ srvctl add listener -endpoints "TCP:1521"
[oracle@orars12 ~]$ srvctl start listener
[oracle@orars12 ~]$ srvctl status  listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): orars12

2. Recreate ora.asm 
[oracle@orars12 ~]$ srvctl stop database -d ors4
PRCD-1229 : An attempt to access configuration of database ors4 was rejected because its version 11.2.0.4.0 differs from the program version 12.1.0.2.0. Instead run the program from /u01/app/oracle/product/11204/ors.
--> Use 11.2.0.4 srvctl
[oracle@orars12 database]$ srvctl stop database -d ors4     [ Use 11.2.0.4 srvctl ]
[oracle@orars12 ~]$ srvctl stop diskgroup -diskgroup DATA
[oracle@orars12 database]$ srvctl modify database -d ors4  -z [ Use 11.2.0.4 srvctl ]
[oracle@orars12 ~]$ srvctl stop database -d ors4
PRCD-1229 : An attempt to access configuration of database ors4 was rejected because its version 11.2.0.4.0 differs from the program version 12.1.0.2.0. Instead run the program from /u01/app/oracle/product/11204/ors.
[oracle@orars12 ~]$ srvctl stop diskgroup -diksgroup DATA
PRKO-2002 : Invalid command line option: -diksgroup
[oracle@orars12 ~]$ srvctl stop diskgroup -diskgroup DATA

remove dependency between db and diskgroup via
[oracle@orars12 ~]$ srvctl remove diskgroup -diskgroup DATA
[oracle@orars12 ~]$ srvctl remove asm
PRCR-1025 : Resource ora.asm is still running
[oracle@orars12 ~]$ srvctl stop asm
[oracle@orars12 ~]$ srvctl remove asm
[oracle@orars12 ~]$ srvctl add asm
[oracle@orars12 ~]$ srvctl start asm
[oracle@orars12 ~]$ asmcmd lsdg

[oracle@orars12 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: 
ASM listener: LISTENER
Spfile: 
ASM diskgroup discovery string: ++no-value-at-resource-creation--never-updated-through-ASM++
--> DG not availave yet

[oracle@orars12 database]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      Started,STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.ors4.db                    1   OFFLINE      OFFLINE      -               Instance Shutdown,ST ABLE

3.  Recreate the ora.diskgroup.dg
SQL> startup pfile='/tmp/init+ASM.ora';
ASM instance started

Total System Global Area 1140850688 bytes
Fixed Size            2933400 bytes
Variable Size         1112751464 bytes
ASM Cache           25165824 bytes
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15040: diskgroup is incomplete

-->  add asm_diskstring to init+ASM.ora
$ cat /tmp/init+ASM.ora 
asm_diskgroups='DATA'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
asm_diskstring='/dev/asm*' 

SQL>  startup force pfile='/tmp/init+ASM.ora';
ASM instance started
Total System Global Area 1140850688 bytes
Fixed Size            2933400 bytes
Variable Size         1112751464 bytes
ASM Cache           25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled

Verify DG
[oracle@orars12 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     10236     8712                0            8712              0             N  DATA/

Create ASM SPILE
SQL> create spfile='+DATA' from  pfile='/tmp/init+ASM.ora';
[oracle@orars12 ~]$ asmcmd spget
+DATA/ASM/ASMPARAMETERFILE/registry.253.857645183

Add Database/DG dependency
[oracle@orars12 ~]$  srvctl modify database -d ORS4   -a DATA
PRCD-1229 : An attempt to access configuration of database ORS4 was rejected because its version 11.2.0.4.0 differs from the program version 12.1.0.2.0. Instead run the program from /u01/app/oracle/product/11204/ors.
[oracle@orars12 grid]$ srvctl modify database -d ORS4   -a DATA ( use 11.2.0.4 srvctl )

Start DB and verify resources 
[oracle@orars12 grid]$ srvctl start database -d ORS4
[oracle@orars12 grid]$ crs
*****  Local Resources: *****
Rescource NAME                 TARGET     STATE           SERVER       STATE_DETAILS                       
-------------------------      ---------- ----------      ------------ ------------------                  
ora.DATA.dg                    ONLINE     ONLINE          orars12      STABLE   
ora.LISTENER.lsnr              ONLINE     ONLINE          orars12      STABLE   
ora.asm                        ONLINE     ONLINE          orars12      STABLE   
ora.ons                        OFFLINE    OFFLINE         orars12      STABLE   
*****  Cluster Resources: *****
Resource NAME               INST   TARGET       STATE        SERVER          STATE_DETAILS
--------------------------- ----   ------------ ------------ --------------- -----------------------------------------
ora.cssd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.diskmon                    1   OFFLINE      OFFLINE      -               STABLE  
ora.evmd                       1   ONLINE       ONLINE       orars12         STABLE  
ora.ors4.db                    1   ONLINE       ONLINE       orars12         Open,STABLE

Related BUGs

  • CRS-5818 Messages in GI alert log file as lsnrctl process stuck in “D” state due to OS/IO issue (Doc ID 1549507.1)
  • Oracle RAC Resources show UNKNOWN or OFFLINE status due to disk space full in GRID_HOME (Doc ID 1673400.1)
  • Bug 16033988 : RAC ONE-NODE NODE CRASHED AND DBS DIDN’T FAILOVER OR START

Leave a Reply

Your email address will not be published. Required fields are marked *