RE: Auto Shutdown of Oracle Needs Lock File in /Var/Lock/Subsys



I ran into this with some custom processes also. It turns out that the
"rc" command (which is what actually switches runlevels) checks to see
if there are files in /var/lock/subsys. If the files are there, the rc
command will process K* scripts. If they are missing, the rc command
skips the shutdown on the assumption that the processes are already
stopped. It took me several weeks to finally figure that out.

From /etc/rc.d/rc:
# First, run the KILL scripts.
for i in /etc/rc$runlevel.d/K* ; do
check_runlevel "$i" || continue

# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/K??}
[ -f /var/lock/subsys/$subsys -o -f
/var/lock/subsys/$subsys.init ] || continue
##### ^^^^^ If /var/lock/subsys/subsys or subsys.init exist... ^^^
Otherwise move to the next subsystem
##### subsys is the name of the init script (in your case
dbora)


It's that test there that is causing the behavior.

The corresponding part in the startup section is:
# Now run the START scripts.
for i in /etc/rc$runlevel.d/S* ; do
check_runlevel "$i" || continue

# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/S??}
[ -f /var/lock/subsys/$subsys -o -f
/var/lock/subsys/$subsys.init ] && continue
##### ^^^^^ If /var/lock/subsys/subsys or subsys.init exist then
move to the next subsystem since it's already up
##### subsys is the name of the init script (in your case
dbora)

Maarten Broekman

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Garris, Nicole
Sent: Thursday, September 13, 2007 5:21 PM
To: redhat-list@xxxxxxxxxx
Subject: Auto Shutdown of Oracle Needs Lock File in /Var/Lock/Subsys

This problem is resolved but I'm not clear why/how. I installed Oracle
Standard 10.2 on Red Hat Advanced Server 4. When rebooting the server,
automatic startup of Oracle works, but automatic shutdown does not after
following instructions in Oracle Database Administrator's Reference 10g
Release 2 for UNIX-Based Operating Systems, section 2.2.2. Turns out
that the following command(s) have to be added to the Oracle startup
script /etc/rc.d/init.d/dbora to create a file in /var/lock/subsys.



su - $ORA_OWNER -c $ORACLE_HOME

touch /var/lock/subsys/dbora



Can anyone explain to a Linux newbie why the file has to be added to
that folder and how the Linux start/stop procedure uses it? Thanks!

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=subscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • SUMMARY: sudo version 1.6.7p5 : using -H -u options on Solaris 8
    ... Many thanks to those that responded, as expected all responses were helpful. ... This will allow you to do the thing that the user oracle requires while also ... designated in the sudoers file who requires to use the command, ... there is a CLASSPATH variable set which, as the oracle user I can see by ...
    (SunManagers)
  • Re: Basic question | run multiple queries without reconnecting
    ... :>From an oracle client like oracle sqldeveloper, I can run the DCL - ... : system as role: sysdba - but then I cant even connect to the db.. ... as default - I get the same error when I run this command: ...
    (comp.databases.oracle.server)
  • Re: How many names and addresses can you have for ID card
    ... Think command line only (except when you're installing, ... which is unsettling to we Linux users. ... This is NOTHING to do with Oracle though. ...
    (uk.legal)
  • Re: AIX Performance issue
    ... however approx 30 users normally access AIX server ... > through oracle application, every thing was running fine during last 3 ... > sar and lpstat command and their output was as given below. ... > Mostly when error occurred our database daily backup was in process ...
    (comp.unix.aix)
  • Re: Storing paswords encrypted in DB tables.
    ... Also, quite often, the passwd program will ... Oracle program do that? ... and it will be asking for a root login to ... scanning of environment variables or command lines (all available ...
    (comp.security.unix)