How can I do to start Oracle in Solaris automatically? [message #285065] |
Mon, 03 December 2007 04:56 |
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
However, I did not stop DB service. Were am wrong?
|
|
|
|
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 |
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 #286336 is a reply to message #286225] |
Fri, 07 December 2007 03:23 |
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
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
|
|
|