hchibuda
asked on
Shutdown and startup of AIX 4.3 server
I have an Oracle database which is running on AIX 4.3. I want to be able to shutdown and startup this database automatically when I shutdown or startup the AIX server respectively. I already have scripts to startup and shutdown the database but now i don't know where to save these so that they are executed when the system shutsdown or startsup. Anyone with ideas?
ASKER
here's a copy of my inittab - itried out what the link says but still the database didn't start automatically - where exactly within this file should i have added the line or did i do it wrongly. The lines with **** are the ones i added.
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/ rc.powerfa il 2>&1 | alog -tboot > /dev/console # Power
Failure Detection
load64bit:2:once:/etc/meth ods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
mkatmpvc:2:once:/usr/sbin/ mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/a tmsvcd >/dev/console 2>&1
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/f bcheck 2>&1 | alog -tboot > /dev/console # run /etc/fi
rstboot
srcmstr:2:respawn:/usr/sbi n/srcmstr # System Resource Controller
rcnetw:2:wait:/etc/rc.netw are #start Netware
cnsview:2:wait:/usr/bin/cn sview -c "daemon start" >/dev/console 2>&1 # Start cns
view daemon
rctcpip:2:wait:/etc/rc.tcp ip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:2:respawn:/usr/sbin/c ron
piobe:2:wait:/usr/lib/lpd/ pio/etc/pi oinit >/dev/null 2>&1 # pb cleanup
qdaemon:2:wait:/usr/bin/st artsrc -sqdaemon
writesrv:2:wait:/usr/bin/s tartsrc -swritesrv
uprintfd:2:respawn:/usr/sb in/uprintf d
logsymp:2:once:/usr/lib/ra s/logsympt om # for system dumps
pmd:2:wait:/usr/bin/pmd > /dev/console 2>&1 # Start PM daemon
diagd:2:once:/usr/lpp/diag nostics/bi n/diagd >/dev/console 2>&1
imnss:2:once:/usr/IMNSearc h/bin/imns s -start imnhelp >/dev/console 2>&1
httpdlite:2:once:/usr/IMNS earch/http dlite/http dlite -r /etc/IMNSearch/httpdlite/
httpdlite.conf >/dev/console 2>&1
imqss:2:once:/usr/IMNSearc h/bin/imq_ start >/dev/console 2>&1
i4ls:2:wait:/etc/i4ls.rc > /dev/null 2>&1 # Start i4ls
orapw:2:wait:/etc/loadext /etc/pw-syscall4.1
acfgd:2:wait:/usr/sbin/lac fgd > /dev/console 2>&1 # Start auto-config daemon
dt_nogb:2:wait:/etc/rc.dt
cons:0123456789:respawn:/u sr/sbin/ge tty /dev/console
mflmf:2:wait:sh /etc/mflmrcscript > /dev/null 2>&1
#mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1
****oracle7:2:wait:/usr/bi n/su oracle7 -c | /oracle/app/product/7.3.4/ bin/dbstar t
****mimsprd:2:wait:/usr/bi n/su mimsprd -c msstrtup
lpd:2:once:/usr/bin/starts rc -s lpd
init:2:initdefault:
brc::sysinit:/sbin/rc.boot
powerfail::powerfail:/etc/
Failure Detection
load64bit:2:once:/etc/meth
mkatmpvc:2:once:/usr/sbin/
atmsvcd:2:once:/usr/sbin/a
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/f
rstboot
srcmstr:2:respawn:/usr/sbi
rcnetw:2:wait:/etc/rc.netw
cnsview:2:wait:/usr/bin/cn
view daemon
rctcpip:2:wait:/etc/rc.tcp
rcnfs:2:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:2:respawn:/usr/sbin/c
piobe:2:wait:/usr/lib/lpd/
qdaemon:2:wait:/usr/bin/st
writesrv:2:wait:/usr/bin/s
uprintfd:2:respawn:/usr/sb
logsymp:2:once:/usr/lib/ra
pmd:2:wait:/usr/bin/pmd > /dev/console 2>&1 # Start PM daemon
diagd:2:once:/usr/lpp/diag
imnss:2:once:/usr/IMNSearc
httpdlite:2:once:/usr/IMNS
httpdlite.conf >/dev/console 2>&1
imqss:2:once:/usr/IMNSearc
i4ls:2:wait:/etc/i4ls.rc > /dev/null 2>&1 # Start i4ls
orapw:2:wait:/etc/loadext /etc/pw-syscall4.1
acfgd:2:wait:/usr/sbin/lac
dt_nogb:2:wait:/etc/rc.dt
cons:0123456789:respawn:/u
mflmf:2:wait:sh /etc/mflmrcscript > /dev/null 2>&1
#mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1
****oracle7:2:wait:/usr/bi
****mimsprd:2:wait:/usr/bi
lpd:2:once:/usr/bin/starts
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry there was an error on the link:
http://www.cs.nott.ac.uk/TSG/manuals/databases/oracle/standard/a90346/post-ins.htm#1033413
I should review it before post it for you.
http://www.cs.nott.ac.uk/TSG/manuals/databases/oracle/standard/a90346/post-ins.htm#1033413
I should review it before post it for you.
Mmm gents
I have several Oracle databases running which startup on boot. My platform is solaris, but I would imagine theres a lot of similarities.
Anyway, you need to have a file in /var/opt/oracle called oratab which should have :-
DREAMTST:/u01/app/oracle/p roduct/8.1 .5:Y
To explain what it means :-
Name of db:location:start Y or N
Ok, right, after that you need to have a start up script that starts or stops. Ignoring the snytax around the commands, the commands are :-
to start
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart &
su - $ORACLE_OWNER -c "lsnrctl start"
to stop
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut &
su - $ORACLE_OWNER -c "lsnrctl stop"
Obviously you need to ensure you've defined ORACLE_HOME and ORACLE_OWNER. You need to start the database and the listeners, otherwise, no db for you :-)
Obviously, the commands / locations and database names might be different.
Best of luck
SBK
I have several Oracle databases running which startup on boot. My platform is solaris, but I would imagine theres a lot of similarities.
Anyway, you need to have a file in /var/opt/oracle called oratab which should have :-
DREAMTST:/u01/app/oracle/p
To explain what it means :-
Name of db:location:start Y or N
Ok, right, after that you need to have a start up script that starts or stops. Ignoring the snytax around the commands, the commands are :-
to start
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart &
su - $ORACLE_OWNER -c "lsnrctl start"
to stop
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut &
su - $ORACLE_OWNER -c "lsnrctl stop"
Obviously you need to ensure you've defined ORACLE_HOME and ORACLE_OWNER. You need to start the database and the listeners, otherwise, no db for you :-)
Obviously, the commands / locations and database names might be different.
Best of luck
SBK
How's it going ?
ASKER
thanks yuzh you can have the points -
You can have look at the following page for detail instructions:
http://www.cs.nott.ac.uk/TSG/manuals/databases/oracle/standard/a90346/post-ins.htm#1033413