- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Oracle 10g automated startup/shutdown HP-UX 11...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2010 05:28 AM
тАО05-26-2010 05:28 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
Here's the script without those ugly characters (I did a copy-paste from a Word document and that's why it got like that... sorry!):
#!/bin/sh
#installation
ORACLE_HOME=/oracle/oraHome1
PATH=${PATH}:$ORACLE_HOME/bin:/usr/bin
HOST=`hostname`
#change the value of ORACLE to the login name of the oracle owner
ORACLE=oracle
export ORACLE_HOME PATH
LOG=$ORACLE_HOME/startup.log
rm -f $LOG
touch $LOG
chmod 666 $LOG
chown oracle:users $LOG
# When HP-UX starts/stops
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
echo "starting Oracle Net listener" >> $LOG
echo "starting Oracle databases" >> $LOG
su - oracle -c "$ORACLE_HOME/bin/dbstart >> $LOG"
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start >> $LOG"
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
echo "stopping Oracle Net listener" >> $LOG
echo "stopping Oracle databases" >> $LOG
su - oracle -c "$ORACLE_HOME/bin/dbshut >> $LOG"
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop >> $LOG"
;;
*)
echo "Starting Automated Oracle startup"
exit
;;
esac
#
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2010 10:10 AM
тАО05-26-2010 10:10 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
There are a hundred different ways to get this done.
#!/sbin/sh
# Description: Start-up script for Oracle DB's and Apps
# Format: oracle start_msg | stop_msg | start | stop
# Exit values: 0 = success; causes "OK" to show up in checklist.
# 1 = failure; causes "FAIL" to show up in checklist.
# 2 = skip; causes "N/A" to show up in checklist.
# Input and output:
# stdin is redirected from /dev/null
# stdout and stderr are redirected to the /etc/rc.log file
# during checklist mode, or to the console in raw mode.
# -------------------------------------------------------------
# Initialize
# -------------------------------------------------------------
Arg=$1
Desc='Oracle Database and Apps '
PATH=/sbin:/usr/sbin:/usr/bin
# -------------------------------------------------------------
# Process argument
# -------------------------------------------------------------
case $Arg in
'start_msg')
echo "Starting the $Desc";;
'stop_msg')
echo "Stopping the $Desc";;
'start')
if [ -f /etc/rc.config.d/oracle ]
then
. /etc/rc.config.d/oracle
else
echo "ERROR: /etc/rc.config.d/oracle file MISSING"
fi
if [ "$ORA_START" -eq 1 ]
then
/u01/app/oracle/local/scripts/start_ora_dana ALL
else
exit 2
fi # end if ORA_START=0 in /etc/rc.config.d/oracle
;;
'stop')
if [ -f /etc/rc.config.d/oracle ]
then
. /etc/rc.config.d/oracle
else
echo "ERROR: /etc/rc.config.d/oracle file MISSING"
fi
if [ "$ORA_STOP" -eq 1 ]
then
# /u01/app/oracle/local/scripts/stop_ora_dana ALL
#
/u01/app/oracle/local/scripts/stop_ora_all.sh
else
exit 2
fi # end if ORA_STOP=0 in /etc/rc.config.d/oracle
;;
*)
echo "usage: $0 {start|stop|start_msg|stop_msg|signal}" 1>&2
exit 1
;;
esac
exit 0
# This is classic HP-UX, using control files in /etc/rc.config.d
It works on all supported versions of Oracle Database server and apparently (I did not write this) Oracle apps.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2010 08:04 PM
тАО05-26-2010 08:04 PM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
SEP, thanks.
>>># This is classic HP-UX, using control files in /etc/rc.config.d
It works on all supported versions of Oracle Database server and apparently (I did not write this) Oracle apps.
You suggest another script moreover to put this one in other catalog /etc/rc.config.d. Could\would you explain me different between action? Now i'm thinking which action to do.
Regards,
Rustam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2010 12:52 AM
тАО05-28-2010 12:52 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
I did all steps but it doesnt work. Oracles doesnt start.
I want to manually run the link S900oracle but get error:
$ ./S990oracle start
-bash: ./S990oracle: Permission denied
though link permission has execute option
$ ls -al S990oracle
lrwxr-xr-x 1 root sys 19 May 28 12:18 S990oracle -> /sbin/init.d/oracle
what do you think but i did wrong?
Regards,
Rustam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2010 02:06 AM
тАО05-28-2010 02:06 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
I had to run from root not from my oratst. Moreover i forget to change user oracle to my user oratst. Now database startup and shutdown but listener cant start and stop. I can connect to DB local but not remotely :(.
I checked log file and found this:
/sbin/rc3.d/S990oracle: starting up
Fri May 28 14:33:41 WSTDST 2010
starting Oracle Net listener
starting Oracle databases
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME
Processing Database instance "prod": log file /u01/app/oracle/product/10.2.0/db_1/startup.log
# su - oratst -c 'export'
doesnt show ORACLE_HOME environment. Should i add something in my script to set ORACLE_HOME for listener?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2010 04:37 AM
тАО05-28-2010 04:37 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
I believe you user oratst should have environment variables ORACLE_HOME, ORACLE_BASE and ORACLE_SID set.
Set these variables on user oratst's environment (through .login or .cshrc, see your environment please) and try again.
Tell me if that worked.
Regards,
Miguel Rentes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2010 04:53 AM
тАО05-28-2010 04:53 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
definitly oratest has these environments, i checked again with $ evn and $export both showed list of environments where were these environments.
But when i type from root user:
# su - oratst -c 'export'
i didnt see ORACLE_HOME environments.
Then i did like this:
# vi reboot_lsn
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=${PATH}:${ORACLE_HOME}/bin
$ORACLE_HOME/bin/lsnrctl start >> LOG
and saved this file in oratst's home
then run
#su - oratst ./reboot_lsn
it started my LISTENER after that i changed 3 values in this script to
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=${PATH}:${ORACLE_HOME}/bin
$ORACLE_HOME/bin/lsnrctl start PROD>> LOG
run once again and my listener PROD started.
Now i'm thinking how to change your script. Your didnt statr even default LISTENER.
Regards,
Rustam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2010 01:31 AM
тАО06-04-2010 01:31 AM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
How can i start any software or service(in my situation lsnrctl) by root during starting up OS except this command:?
su - oracle -c "/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start PROD >> LOG"
or
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start PROD >> LOG"
First i want to get this tip through the CLI if will be ok then will put in the script.
Regards,
Rustam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 10:04 PM
тАО06-16-2010 10:04 PM
Re: Oracle 10g automated startup/shutdown HP-UX 11.23
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start PROD >> LOG"
withou '-' before user_name, like this
su oracle -c "$ORACLE_HOME/bin/lsnrctl start PROD >> LOG"
and listner PROD is started.
But this script doest work on another server, on my standby server. OS, and softwares are the same. I checked environments in both servers. And determined that shell is different. Could it be thge reason? Where this script runs\works shell is bash (SHELL=/usr/local/bin/bash) and where doesnt work shell is bash also (SHELL=/bin/bash) but runs from other directory. Or cant be the reason of the problem?
Regards,
Rustam
)
- « Previous
-
- 1
- 2
- Next »