When you completed database creation, close "Oracle Universal Installer " program and in a terminal window, to start Oracle LISTENER, type
lsnrctl start
If listener started, You will see a message similar this:
LSNRCTL for Intel SVR4 UNIX: Version 8.1.7.0.0 - Production on 23-JUN-2002 04:02:46Security OFFSNMP OFFServices Summary...PLSExtProc has 1 service handler(s)orcl has 1 service handler(s)The command completed successfully
If you see something like following, the listener already started:
LSNRCTL for Intel SVR4 UNIX: Version 8.1.7.0.0 - Production on 24-JUN-2002 05:02:46(c) Copyright 1998 Oracle Corporation. All rights reserved.TNS-01106: Listener using listener name LISTENER has already been started
If everything is OK, you may start the database by the command;
dbstart
This command's result must be similar this;
Oracle Server Manager Release 3.1.7.0.0 - Production…
Database "orcl" warm started.
Ok. Database creation is complete. Let's make our database to start automatically by the system, now.
POST-INSTALLATIONBefore you start the database, you need to edit "oratab" file by using your preferred text editor. You will see the following row at the bottom of the page:
orcl:/opt/oracle/product/8.1.7:N
To start Oracle Database by using "dbstart", you must change this row as
orcl:/opt/oracle/product/8.1.7:Y
Click here for a sample "oratab" file.
When you made this change, you also have to edit the two files. These are "dbstart" and "dbshut" files in the "$ORACLE_HOME/bin" directory. In this tutorial, $ORACLE_HOME refers to "/opt/oracle/product/8.1.7". Open these files by an editor and find the row at the top of pages
ORATAB=/etc/oratab
and change it as follows;
ORATAB=/var/opt/oracle/oratab
3-) In your text editor, open a new blank page and type the following rows:
#!/sbin/sh
ORAHOME=/opt/oracle/product/8.1.7ORAOWNER=oracle
if [ ! -f $ORAHOME/bin/dbstart ] ;then echo "ERROR: Cannot start Oracle Database Server"fi
case "" in start) echo "Starting Oracle Database... \c" su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl start" > /dev/null su - $ORAOWNER -c $ORAHOME/bin/dbstart > /dev/null echo "Done." ;;
stop) echo "Stopping Oracle Database... \c" su - $ORAOWNER -c $ORAHOME/bin/dbshut > /dev/null su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl stop" > /dev/null echo "Done." ;;
*) echo "You must tell what you want me to do." echo "Usage : ./dbora [start | stop ]" echo " start - Start Oracle Database immediately" echo " stop - Stop Oracle Database immediately" ;;
esac
exit
Click here for a sample "dbora" file.
Save this file to "/etc/init.d" directory as "dbora". This file will be used to start up and shut down database automatically by the system. Now, type the following commands in a terminal window as root:
chmod 744 /etc/init.d/dbora chown root:sys /etc/init.d/dbora ln /etc/init.d/dbora /etc/rc0.d/K10dbora ln /etc/init.d/dbora /etc/rc1.d/K10dbora ln /etc/init.d/dbora /etc/rc2.d/S90dbora






