• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1865
  • Last Modified:

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?
0
hchibuda
Asked:
hchibuda
  • 4
  • 2
1 Solution
 
yuzhCommented:
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

0
 
hchibudaAuthor Commented:
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
0
 
yuzhCommented:
the problem is a "|" in the inittab, it make sense to have something like:

/bin/su oracle7 -c /oracle/app/product/7.3.4/bin/dbstart

To start oracle as user "oracle"

so you inittab should looka like:

oracle7:2:wait:/bin/su oracle7 -c  /oracle/app/product/7.3.4/bin/dbstart

or if you want to be dead sure that to use user oracle' ENV
you can do:

oracle7:2:wait:/bin/su - oracle7 -c  /oracle/app/product/7.3.4/bin/dbstart




0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
yuzhCommented:
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.
0
 
SBK1972_ukCommented:
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







0
 
yuzhCommented:
How's it going ?
0
 
hchibudaAuthor Commented:
thanks yuzh you can have the points -
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now