mardi 9 août 2011

Oracle11g : How to manage an instance using srvctl

Under Oracle11g you can use the srvctl executable to manage all components of your database:

To start a specific database
>srvctl start database -d your_db_sid -o open

To stop the database
>srvctl stop database -d your_db_sid -o immediate

To obtain the status of a database
>srvctl status database -d your_db_sid


To start a listener
>srvctl start listener -l your_listener_name

To stop a listener
>srvctl stop listener -l your_listener_name

To obtain the status of a listener
>srvctl status listener -l your_listener_name


To start an asm instance
>srvctl start asm -n node_name -i asm_instance_name -o oracle_home

where :
-n node_name Node name.
-i asm_instance_name The ASM instance name.
-o oracle_home Oracle home for the database.

for example :
>srvctl start asm -i asm1 -o /opt/oracle/11.2.0


To stop an asm instance
>srvctl stop asm -i asm_instance_name

To obtain the status of an asm instance
>srvctl status asm -i asm_instance_name