?
Solved

Shutdown and startup of AIX 4.3 server

Posted on 2003-03-31
7
Medium Priority
?
1,861 Views
Last Modified: 2012-06-27
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
Comment
Question by:hchibuda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 8237272
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
 

Author Comment

by:hchibuda
ID: 8244267
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
 
LVL 38

Accepted Solution

by:
yuzh earned 300 total points
ID: 8245710
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 38

Expert Comment

by:yuzh
ID: 8245735
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
 
LVL 1

Expert Comment

by:SBK1972_uk
ID: 8260148
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
 
LVL 38

Expert Comment

by:yuzh
ID: 8269488
How's it going ?
0
 

Author Comment

by:hchibuda
ID: 8281867
thanks yuzh you can have the points -
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question