Link to home
Start Free TrialLog in
Avatar of hchibuda
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?
Avatar of yuzh
yuzh

Save your script in somewhere on your system and edit the /etc/inittab file, to call the script.

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

Avatar of hchibuda

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.powerfail 2>&1 | alog -tboot > /dev/console # Power
 Failure Detection
load64bit:2:once:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:2:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/fi
rstboot
srcmstr:2:respawn:/usr/sbin/srcmstr # System Resource Controller
rcnetw:2:wait:/etc/rc.netware #start Netware
cnsview:2:wait:/usr/bin/cnsview -c "daemon start" >/dev/console 2>&1 # Start cns
view daemon
rctcpip:2:wait:/etc/rc.tcpip > /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/cron
piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1  # pb cleanup
qdaemon:2:wait:/usr/bin/startsrc -sqdaemon
writesrv:2:wait:/usr/bin/startsrc -swritesrv
uprintfd:2:respawn:/usr/sbin/uprintfd
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
pmd:2:wait:/usr/bin/pmd > /dev/console 2>&1 # Start PM daemon
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
imnss:2:once:/usr/IMNSearch/bin/imnss -start imnhelp >/dev/console 2>&1
httpdlite:2:once:/usr/IMNSearch/httpdlite/httpdlite -r /etc/IMNSearch/httpdlite/
httpdlite.conf >/dev/console 2>&1
imqss:2:once:/usr/IMNSearch/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/lacfgd > /dev/console 2>&1 # Start auto-config daemon
dt_nogb:2:wait:/etc/rc.dt
cons:0123456789:respawn:/usr/sbin/getty /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/bin/su oracle7 -c | /oracle/app/product/7.3.4/bin/dbstart
****mimsprd:2:wait:/usr/bin/su mimsprd -c msstrtup
lpd:2:once:/usr/bin/startsrc -s lpd
ASKER CERTIFIED SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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/product/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







How's it going ?
thanks yuzh you can have the points -