Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starting 9iAS using services only

2 views
Skip to first unread message

Stefan

unread,
Dec 8, 2004, 2:54:40 PM12/8/04
to
Is is possible to create automatic startup of 9ias using the Services
only (i.e. without starting any components from the command prompt or
from the EM website)?

If yes, what is the right order of starting the services?

I have the Infrastructure and MidTier on the same machine.

If what i'm asking can't be done, does anyone have any good ways used
to automated the startup of 9ias

Thanks.
Stefan

yon...@yahoo.com

unread,
Dec 9, 2004, 10:02:49 AM12/9/04
to
Hi, Stefan,

This is a frequently asked question. The problem is that OID relies on
iasdb and the midtier startup relies on OID. But iasdb could startup
too late, due to e.g. earlier unclean shutdown. We need to delay OID
startup. Metalink Note:158983.1 and Note:216269.1 suggest creating a
separate service to achieve this goal. I think that's an overkill. Not
many people are aware of the method Windows starts up services or runs
programs in specified order on reboot (the way UNIX achieves this is
well known). Try this to see if it works for you.

1. Change OID service startup type from Automatic to Manual.
2. Create a file start_oidsvc.bat, which contains
------ Begin cut ------
rem Hope a minute is enough for iasdb to recover (if needed); sleep.exe
can be ftp'ed from many web sites
sleep 60
oidmon start
oidctl server=oidldapd instance=1 start
------ End cut ------
3. Create a shortcut start_oidsvc.lnk under
C:\WINNT\system32\GroupPolicy\Machine\Scripts\Startup pointing to your
start_oidsvc.bat.
4. Add the shortcut to the Local Computer Policy startup script folder.
I.e., type command mmc. Go to Console | Add/Remove Snap-in | Local
Computer Policy. In the snap-in, go to Computer Configuration | Windows
Settings | Scripts (Startup/Shutdown) | Startup. Click Show Files
button to make sure the shortcut is shown. Click Add to add the
shortcut to the Scripts window (selecting the shortcut changes the
filename display to the real target file start_oidsvc.bat).

Unfortunately we're not taking advantage of Windows's capability of
running scripts in order, because once iasdb service is started, it's
hard to determine when it's fully ready. But feel free to write a
script to login and select from dual to make sure it's ready, if you
don't want to rely on sleep 60 in your start_oidsvc.bat.

To test, create a big transaction in iasdb. Kill the database process
in task manager (or shutdown abort from another session). Reboot and
check for "Beginning crash recovery of 1 threads" in alert.log. And
make sure these processes
oidservice.exe (3040)
**oidldapd.exe (2896)
****oidldapd.exe (892)
are seen in indented format (my tlist -t output; I added * because
Google groups-beta removes leading spaces).

Yong Huang

nikhil...@yahoo.com

unread,
Dec 11, 2004, 10:11:29 AM12/11/04
to
· Place the script "oracle" in the directory /sbin/init.d with
file permissions of 755.
· Create the following links
o /sbin/rc3.d/K999oracle -> /sbin/init.d/oracle
o /sbin/rc3.d/S999oracle -> /sbin/init.d/oracle

Script
#!/bin/sh
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_Home
#
ORACLE_HOME=/opt/oracle/product/10g_infra
ORA_OWNER=oracle

if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi

case "$1" in
start)
# start the oracle databases:
# the following command assumes that the oracle login
# will not prompt the user for any values
export ORACLE_HOME=/opt/oracle/product/10g_infra
/usr/bin/su - $ORA_OWNER -c "export
ORACLE_HOME=$ORACLE_HOME;$ORACLE_HOME/bin/lsnrctl start"
/usr/bin/su - $ORA_OWNER -c $ORACLE_HOME/bin/dbstart
/usr/bin/su - $ORA_OWNER -c "$ORACLE_HOME/opmn/bin/opmnctl
startall"
/usr/bin/su - $ORA_OWNER -c "$ORACLE_HOME/bin/emctl start em"
export ORACLE_HOME=/opt/oracle/product/10g_app
/usr/bin/su - $ORA_OWNER -c "$ORACLE_HOME/opmn/bin/opmnctl
startall"
/usr/bin/su - $ORA_OWNER -c "$ORACLE_HOME/bin/emctl start em"
echo "OK"
;;
stop)
#stop the oracle databases:
this is my script but you can adjust it for your use

Message has been deleted
0 new messages