-   Linux - Newbie (
-   -   Cannot run auto shutdown script for oracle database (

inaki 03-18-2010 03:16 AM

Cannot run auto shutdown script for oracle database
Dear all,
The situation is like this, in order to do full backup system, i have to shutdown the oracle database. My backup software can stop the services by running the shutdown script.

But in order to shutdown the oracle database, the script must be run under oracle privilege. The conflict is our backup system which is reside under root privilege cannot run the oracle shutdown script which is needed to triggered by oracle privilege.

catkin 03-18-2010 03:33 AM

Then how does the oracle shutdown work during server shutdown when the shutdown script is run as root?

root can su without supplying a password so the general technique in boot/shutdown scripts is

su <appropriate user name> <service/daemon control command>
In the case of oracle, the oracle user's login customisation is required to set envars so "su -" is used and the general command becomes

su - $ORA_OWNR -c <some oracle command>
This is illustrated in the many sample oracle boot/shutdown scripts posted on the net, for example here.

All times are GMT -5. The time now is 03:04 PM.