Home » Infrastructure » Unix » How can I do to start Oracle in Solaris automatically?
How can I do to start Oracle in Solaris automatically? [message #285065] Mon, 03 December 2007 04:56 Go to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Dear all!

I have installed Oracle 10g in Solaris 10, however, every time I restart the machine, so, I have to start Listener and Database service manually.
Would you like to guide me?

Thank you very much.

P/S: Following the instruction article, I created a file named as dbora in /etc/init.d.

#!/bin/sh

ORA_HOME=/u01/app/oracle/oracle/product/10.2.0/VNP
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi

case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
;;
'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac 



Then, I edited the /var/opt/oracle/oratab

Quote:


TINHCUOC:/u01/app/oracle/oracle/product/10.2.0/NEO:Y <--



Granted the privilege to oracle with 777
#chmod 777 /etc/init.d/dbora


At the end, I tried to stop and start DB with

#/etc/init.d/dbora stop


However, I did not stop DB service. Were am wrong?

Re: How can I do to start Oracle in Solaris automatically? [message #285069 is a reply to message #285065] Mon, 03 December 2007 05:08 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Did you create the associated K & S scripts?

See Automating Database Startup and Shutdown.
Re: How can I do to start Oracle in Solaris automatically? [message #286208 is a reply to message #285069] Thu, 06 December 2007 21:31 Go to previous messageGo to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Thank you for your reply!

I've finished this work.

So, can you guide me to open afiedt.buf file with configuration in .profile.

This PATH content I place:
PATH=/usr/sbin:/usr/bin:/u01/app/oracle:/usr/sbin:/usr/bin:/u01/app/oracle/oracle/product/10.2.0/VNP/bin:/var/opt/oracle


does not open the afiedt.buf file to edit the last statement.

with:
$ echo $ORACLE_BASE
/u01/app/oracle
$ echo $ORACLE_HOME
/u01/app/oracle/oracle/product/10.2.0/VNP
$ 


Thank you!
Re: How can I do to start Oracle in Solaris automatically? [message #286219 is a reply to message #286208] Thu, 06 December 2007 23:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
What is the relation between afiedt.buf and .profile?

Regards
Michel
Re: How can I do to start Oracle in Solaris automatically? [message #286225 is a reply to message #285065] Thu, 06 December 2007 23:27 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>What is the relation between afiedt.buf and .profile?
afiedt.buf is the file created by the SQL*Plus edit function & I suspect the OP is using SQL*plus to try to modify the .profile because don't know how to use vi or any other command line editor.
Re: How can I do to start Oracle in Solaris automatically? [message #286336 is a reply to message #286225] Fri, 07 December 2007 03:23 Go to previous message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
@ana:

No, I can use both of vi or gedit. And the PATH is the line in $ORACLE_BASE/profile

Exactly, because I often work with Solaris OS, so, it's different to Windows. In the Windows, I do not need to configure PATH to afeidt.buf which open the notepad and re-edit the last statement.

Example:

SELECT
    s.sid                sid
  , s.serial#            serial_id
  , lpad(s.status,9)     session_status
  , lpad(s.username,14)  oracle_username
  , lpad(s.osuser,12)    os_username
  , lpad(p.spid,7)       os_pid
  , s.program            session_program
  , lpad(s.terminal,10)  session_terminal
  , lpad(s.machine,19)   session_machine
FROM
    v$process p
  , v$session s
WHERE
      p.addr (+) = s.paddr
  AND s.status   = 'ACTIVE'
  AND s.username IS NOT null
ORDER BY sid
/


Re-edit
SQL>ed


But, in the Solaris, I must configure the path to use afeidt.buf to reedit last statement by opening a text file. This text file will be saved or not by users, if it save, the afiedt.buf will return all of contents to the SQLplus.

Do I configure this above PATH correctly?

Thank you!

[Updated on: Fri, 07 December 2007 03:29]

Report message to a moderator

Previous Topic: Error Exception Handling from SQLPLUS to PL/SQL
Next Topic: How to find out where oracle is installed?
Goto Forum:
  


Current Time: Sat Nov 23 20:33:47 CST 2024