-
I have created an Oracle 8.1.6 database in Sun Solaris. But when I restart the server, I have to specify ORACLE_SID and export it. How can I make it default and also how can I autostart the database and the listener?
Thanks in advance.
Agasimani
OCP(10g/9i/8i/8)
-
Hi,
1) Edit the .cshrc file and insert the parameter for oracle environment (sid,base,home ...)
2) Create a file in /etc/rc0.d called KA0dbora
and in that file specify the Oracle startup script :
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrstart"
Create a file in /etc/rc2.d called S99dbora and in that file specify the Oralce shutdown script :
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrshut"
-
ORACLE_SID
You can set the ORACLE_SID and export it for all users in the /etc/profile file (using bourne or korn shell). If you have multiple Oracle instances on one box you can use the .profile files of individual users to set this environment variable for each one. You should also run the oraenv script after setting the ORACLE_SID.
There is an Oracle-supplied script in $ORACLE_HOME/bin called dbstart, which is designed to be called at system startup. Unfortunately this does not include listener control commands so you should create a shell script which calls dbstart and then the lsnrctl command. There is a similar script called dbshut for automatic shutdown.
Hope this helps
Gerry Miller
-
The script that had been provided to you would work fine, provided you have the oratab, normally put under
/var/opt/oracle/oratab and make your database start option from "N" to "Y". This would start/shutdown the database during the reboot.
To kick in the listeners try
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
or
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
This should fix the issue. If you need more information on this, there is an old thread that discusses, on this issue and also has a posting on the dbora file.
Good luck
Sam
Thanx
Sam
Life is a journey, not a destination!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|