Tuesday, January 22, 2013

0 Oracle RAC management 3: ocrcheck and srvctl

ocrcheck

ocrcheck is the command to check the Oracle Cluster Register information.

image

 

srvctl

srvctl is the command to  manage, maintain and check the RAC related services, such as Instance, Database, Listener and ASM.  You can see here for the usage example.

Here are other usages for srvctl.

Manage Listener service

srvctl status listener
srvctl status listener -n NODE_NAME
srvctl stop listener 
srvctl stop listener -n NODE_NAME
srvctl start listener
srvctl start listener -n NODE_NAME

Show the listener status

image

Stop listener. There is no output for srvctl, so we need to use crsctl or srvctl to check the listener status

image
Start the listener

image

If we try to start the listener on the node which the listener is already running, we would get the “PRCC-1015 : LISTENER was already running on rac2” error.

image

Manage the database

I already cover the start/stop database via srvctl in here. Here are other usages:

srvctl status database -d DB_UNIQUE_NAME
-- Stop the database,this would stop the Database and instance 
srvctl stop databsae -d DB_UNIQUE_NAME
-- Start the database,this would start the Database and instance 
srvctl start database -d DB_UNIQUE_NAME 
-- Stop instance and database on one instance
srvctl stop instance -d DB_UNIQUE_NAME -i INSTANCE_NAME -o <immediate|abort>
-- Start the instance and database 
srvctl start instance -d DB_UNIQUE_NAME -i INSTANCE_NAME
-- Remove database from the RAC  , This would remove instance, database and Node
srvctl remove database -d DB_UNIQUE_NAME
-- Add database to the RAC
srvctl add database -d DB_UNIQUE_NAME -o ORACLE_HOME
-- Remove Instance from the RAC
srvctl remove instance -d DB_UNIQUE_NAME -i INSTANCE_NAME 
-- Add Instance to the RAC
srvctl add instance -d DB_UNIQUE_NAME -i INSTANCE_NAME -n NODE_NAME
-- Remove node
srvctl remove nodeapps -n NODE_NAME

Stop the database and instance

image

Start the database for one instance. This also bring up the database to the open state.

image

image

image

Reference

:

http://docs.oracle.com/cd/B19306_01/rac.102/b28759/adminoc.htm

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates