Thursday, 26 January 2012

Oracle DB startup Scripts

                             
Starting oracle listener
$ lsnrctl start

Start the database
$ dbstart

 Starting oracle Enterprise manager
$ emctl start dbconsole

 Shutting down the database
$ dbshut

 Stopping the listener
$ lsnrctl stop

 Stopping oracle Enterprise manager
$ emctl stop dbconsole

 Starts sqlplus without logging in to a database
# su ­ oracle
$ sqlplus /nolog

 Logging into default oracle db
$ sqlplus system/oracle11@pfdb

The automatic startup and shutdown of the Oracle database can be achieved with the files dbstart and dbshut both provided by Oracle. These files rely on the existance of the file /etc/oratab to work

$ cat /etc/oratab
orcl:/u01/app/oracle/product/10.2.0/db_1:Y
 

 The first field is the name of my database (orcl), the second one is my home directory
(/u01/app/oracle/product/10.2.0/db_1), and the third indicates to the dbstart utility whether the database should, or should not be brough up at the system boot time with "Y" or "N" parameters respectively. As root user, we'll change last field of this line from "N" to "Y" to let dbstart utility start this database when it runs.



No comments:

Post a Comment