Apr 15, 2015

RAC administration on Oracle 11gR2


Start/ Stop database / instance services status:
From grid user/ grid home

1) Verify instance status 

$ srvctl status instance -d PROD -i PROD2
Instance PROD2 is running on node rac2

2) To Stop instance

$ srvctl stop instance -d PROD -i PROD2

3) To start instance

$ srvctl start instance -d PROD -i PROD2

-- If below message found, then instance services might be runnng.

PRCC-1015 : PROD was already running on rac2
PRCR-1004 : Resource ora.PROD.db is already running

4) To stop all instance services across the nodes:

$ srvctl stop database -d PROD

-- Start/ Stop SCAN listeners in RAC databases:

1) Verify SCAN listener status:

$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac1

$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1


Note: Assume 3 scan IP configured with DNS.

When single / default IP configured with SCAN listener, then status will be shown like below:

$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node host1

2) To stop the scan listener:

$ srvctl stop scan_listener

3) To start the scan listener

$ srvctl start scan_listener

-- Administration on cluster services

1) Verify Cluster services / CRS status
( for single node)
# cd /u01/app/grid/bin
# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

(for all nodes)
# crsctl check cluster -all
**************************************************************
rac1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
rac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

2) To stop Cluster services / CRS 

./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.OCRVD.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'rac1'
CRS-2677: Stop of 'ora.scan3.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'rac2'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stop of 'ora.FRA.dg' on 'rac1' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac2'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.rac1.vip' on 'rac2'
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
CRS-2677: Stop of 'ora.scan2.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'rac2'
CRS-2676: Start of 'ora.scan3.vip' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'rac2'
CRS-2676: Start of 'ora.scan1.vip' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac2'
CRS-2676: Start of 'ora.rac1.vip' on 'rac2' succeeded
CRS-2676: Start of 'ora.scan2.vip' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'rac2'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'rac2' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac2' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'rac2' succeeded
CRS-2677: Stop of 'ora.OCRVD.dg' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac1'
CRS-2677: Stop of 'ora.ons' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac1'
CRS-2677: Stop of 'ora.net1.network' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2673: Attempting to stop 'ora.crf' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac1'
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

Note: Following command can be used to stop cluster in force.

./crsctl stop crs -f

3) Now again check CRS status in the same node where you have stopped cluster / HAS services:

# ./crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services

-- Now see the difference :

-- output where you have stopped CRS:
# ./crsctl check cluster -all
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.

-- output where crs is not stopped:

# ./crsctl check cluster -all
**************************************************************
rac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

Now match the output with previous outputs as shown above.

4) To Start CRS :

# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

Now verify continuesly till all services online:

When all services are not strated:

# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4534: Cannot communicate with Event Manager

# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
CRS-4534: Cannot communicate with Event Manager

When all services are started:

# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

Verify all database services: Connect to oracle user :

$ srvctl status database -d PROD
Instance PROD1 is not running on node rac1
Instance PROD2 is not running on node rac2
$
$ srvctl start database -d PROD
$
$ srvctl status database -d PROD
Instance PROD1 is running on node rac1
Instance PROD2 is running on node rac2

--------------------------------------------------------------------------------------------------------------------
Toubleshoot ASM isntance "INTERMEDIATE"  and "CHECK TIMED OUT" issues:
--------------------------------------------------------------------------------------------------------------------

e.g., When I check CRS status across the nodes, I found below shown issues:

$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
ora.FRA.dg
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                      
               OFFLINE ONLINE       rac2                                      
ora.OCRVD.dg
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
ora.asm
               ONLINE  ONLINE       rac1                   Started            
               ONLINE  INTERMEDIATE rac2                   CHECK TIMED OUT    
ora.gsd
               OFFLINE OFFLINE      rac1                                      
               OFFLINE OFFLINE      rac2                                      
ora.net1.network
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
ora.ons
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
ora.registry.acfs
               ONLINE  ONLINE       rac1                                      
               ONLINE  ONLINE       rac2                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                      
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2                                      
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2                                      
ora.cvu
      1        ONLINE  ONLINE       rac2                                      
ora.ehisaghl.db
      1        OFFLINE OFFLINE                               Instance Shutdown  
      2        OFFLINE OFFLINE                               Instance Shutdown  
ora.PROD.db
      1        ONLINE  ONLINE       rac1                   Open              
      2        ONLINE  ONLINE       rac2                   Open              
ora.PROD.PROD.db1.svc
      1        ONLINE  ONLINE       rac1                                      
ora.PROD.PROD.db2.svc
      1        ONLINE  ONLINE       rac2                                      
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                      
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                      
ora.oc4j
      1        ONLINE  ONLINE       rac2                                      
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                                      
ora.scan2.vip
      1        ONLINE  ONLINE       rac2                                      
ora.scan3.vip
      1        ONLINE  ONLINE       rac2  


In the above one of the ASM isntance is showing "NTERMEDIATE" and "CHECK TIMED OUT" status:

Solution:
1) Stop instance of the issued node.
2) Stop services if created separalty if the node.
3) Stop CRS services ( from root)
4) Start CRS services again ( from root)


------------------------------------------------------------------------------------------------------------------
Toubleshoot Listener status "INTERMEDIATE" & "CHECK TIMED OUT" issues:
------------------------------------------------------------------------------------------------------------------
Suppose, when you found listener and ASM instance with "INTERMEDIATE" & "CHECK TIMED OUT" status, then troubleshoot one by one. First fix ASM instance issues as shown above. Then fix scan listener issues like below:

$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS    
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
ora.FRA.dg
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                    
               ONLINE  INTERMEDIATE rac2                   CHECK TIMED OUT  
ora.OCRVD.dg
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
ora.asm
               ONLINE  ONLINE       rac1                   Started          
               ONLINE  INTERMEDIATE rac2                   CHECK TIMED OUT  
ora.gsd
               OFFLINE OFFLINE      rac1                                    
               OFFLINE OFFLINE      rac2                                    
ora.net1.network
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
ora.ons
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
ora.registry.acfs
               ONLINE  ONLINE       rac1                                    
               ONLINE  ONLINE       rac2                                    
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                    
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2                                    
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2                                    
ora.cvu
      1        ONLINE  ONLINE       rac2                                    
ora.ehisaghl.db
      1        OFFLINE OFFLINE                               Instance Shutdown
      2        OFFLINE OFFLINE                               Instance Shutdown
ora.PROD.db
      1        OFFLINE OFFLINE                               Instance Shutdown
      2        OFFLINE OFFLINE                               Instance Shutdown
ora.PROD.PROD.db.svc
      1        OFFLINE OFFLINE                                                
ora.PROD.PROD.db2.svc
      1        OFFLINE OFFLINE                                                
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                    
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                    
ora.oc4j
      1        ONLINE  ONLINE       rac2                                    
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                                    
ora.scan2.vip
      1        ONLINE  ONLINE       rac2                                    
ora.scan3.vip
      1        ONLINE  ONLINE       rac2


Solution:
1) Check the grid listener status, if running fine
2) Chek the listener status
 $ lsnrctl status
If any listener is running in rdbms home, then stop it and start from grid home.
3) For any issues again, stop SCAN listener and start it again ( from grid user)
 -- To Stop
 $ srvctl stop scan_listener
 -- To start
 $ srvctl start scan_listener
 -- To Check status
 $ srvctl status scan_listener

My other posts related to Oracle 11gR2 RAC: ( Click on the link)

1) To relocate SCAN listener
2) Configure three IPs for scan listener with DNS/ GNS
3) Restore database with upgrade mode in RAC
4) Create & Manage separate services in RAC envionments
5) Troubleshoot 'ora.ctssd' RAC services 'OBSERVER' status
6) To move/ rename datafiles in RAC ASM instances
7) To enable/ disable HAS auto start up

Hope these post help you. Don't forget to post a comment.


No comments:

Post a Comment

Translate >>