Friday 25 January 2013

Proper way of Startup/Shutdown Oracle Database Instance (Solaris) ..

Guys.. I am not a DBA. I am just a SA. But SA role is related with Database environment also. And I think that every SA should know about basic of Database as like how to Start/Shutdown the database service properly.

Let's say.. you need to shutdown the Oracle Database server machine for your maintainance of hardware or other purpose. If you are going to shutdown the server before shutdown the database , Man .. It will be like that you find the risk by yourself and call phone to DBA .. :)

Ok .. Here is the start and shutdown process of the orcale database which is running on solaris .

Startup
If you are already login to solaris terminal with root , change to orcale user

#su - oracle

Enter the following command to start SQL Command Line

#sqlplus

It will ask to type user name type " / as sysdba"

#Enter user-name: / as sysdba
(note: you can use only one command to login SQL command line "#sqlplus / as sysdba" )

To start the database , type follow command : "STARTUP"

 SQL>STARTUP

And type "exit" for leave the sql command line.

SQL>exit

Then, Start the Oracle listener : (If Orcale Database is for remote clients, you will need this step)

#lsnrctl start
Shutdown
If you are already login to solaris terminal with root , change to orcale user

#su - oracle

Enter the following command to start SQL Command Line

#sqlplus

It will ask to type user name type " / as sysdba"

#Enter user-name: / as sysdba

To shutdown the database , type follow command : "SHUTDOWN IMMEDIATE"

SQL> SHUTDOWN IMMEDIATE

And type "exit" for leave the sql command line.

SQL>exit

Then, Stop the Oracle listener : (If you Orcale Database is for remote clients, you will need this step)

#lsnrctl stop

OK now switch back to root user and process to shutdown the solaris OS

#shutdown -y -g0 -i5

>>

UTEE

Ref :http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/startup.htm


No comments:

Post a Comment