- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Oracle 9i HPUX 11. 64 bit Startup/shutdown
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
Forums
Discussions
Discussions
Discussions
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
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
01-10-2006 11:38 PM
01-10-2006 11:38 PM
Oracle 9i HPUX 11. 64 bit Startup/shutdown
i have put a cron job to shutdown oracle :
su - oracle -c ". /app/oracle/product/9.2/bin/dbshut" >>/tmp/dblog/dbshutdown.
says the Error :
ksh: ORACLE_TRACE: parameter not set
When do " su - oracle " and then run the script manaulay ist works fine , but not as cron job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2006 11:49 PM
01-10-2006 11:49 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
I don't think you need to spec the full path for the dbshut command.
Have you changed dbshut? Seems you are setting ORACLE_TRACE somewhere unexpected!
Do all the relevant files exist(/etc/oratab)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 12:10 AM
01-11-2006 12:10 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
see inside the dbshut script
ORATAB=/etc/oratab
case $ORACLE_TRACE in
# that ORACLE
cat $ORATAB | while read LINE
and oratab
Oratab should look like this:
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
MAN:/picnew/oracle/product/9.2:N
P01:/picnew/oracle/product/9.2:Y
P03:/picnew/oracle/product/8.1.7:N
P04:/picnew/oracle/product/8.1.7:N
etc..
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 12:50 AM
01-11-2006 12:50 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
The ORACLE_TRACE is where defiend ??
dbshut:
.....
# This script is used to shutdown ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################
ORATAB=/etc/oratab
trap 'exit' 1 2 3
case $ORACLE_TRACE in
T) set -x ;;
esac
# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/etc
export PATH ;;
esac
# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH
#
# Loop for every entry in oratab file and and try to shut down
# that ORACLE
#
cat $ORATAB | while read LINE
do
case $LINE in
-------------------------
. profile or oracle user :
# @(#)B.11.11_LR
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
...skipping...
# @(#)B.11.11_LR
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
# Set up Oracle Specific Variables
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=/app/oracle/product/9.2
export TNS_ADMIN=$ORACLE_HOME/network/admin
#export SHLIB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib64
export NLS_LANG=american_america.WE8ISO8859P1
export PATH=$PATH:$ORACLE_HOME/bin
name=`hostname`
export ORAVER=9.2
export ORACLE_SID=
#export PS1="#$name],["'$ORAVER'"],["'$ORACLE_SID'"]:"'$PWD'"# "
export PS1=">$name["'$ORACLE_SID'"]:"'$PWD'"# "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 01:26 AM
01-11-2006 01:26 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
for more details on the dbstart script have a look at metalink note 91815.1
Include the definition of ORACLE_TRACE in your startup script. May be a good idea to run your script with debug on anyway.
What is reported in the dbshutdown log file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 01:59 AM
01-11-2006 01:59 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
I have solved Problem:
1. cron.alow for oracle user
2. made a simple script : dbdown
cd /app/oracle../bin
./dbshut
3. cron as oracle user :
. /home/oracle/dbdown >>/tmp/dblog/dbshutdown
cd /
and test this script as cron Job (oracle user)
It worked fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 02:04 AM
01-11-2006 02:04 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
Check this about the forum point system:
http://forums1.itrc.hp.com/service/forums/helptips.do?#22
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 02:05 AM
01-11-2006 02:05 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
that's cheating ;-) Running the script as oracle.
Great idea though!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 02:55 PM
01-11-2006 02:55 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
Pls check it again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 06:49 PM
01-11-2006 06:49 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
What was the core issue in the end ?
We run various (manage 43 db's)
su - oracle -c "$var/dbshut" in the root cron. No probs.
Many Oracle tech sites refer to it.
(Of course you can run a script as
oracle cron when preferred , but to
make it to be the messiah is a bit rich
isn't it ?)
Same story for ORACLE_TRACE.
In fact you can define it if you wanted to
trace, but in most cases it is unset.
Just like one could use set -x in a shell
script, while the default is set +x,
(but not explicitly) whilst not many people know this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 06:56 PM
01-11-2006 06:56 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
But where can i set the ORACLE_TRACE ?
and how to debug the root.cron ?? or the dbshut script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 07:02 PM
01-11-2006 07:02 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
you can set this in the .profile of the oracle user in your case.
hope this helps
regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 07:24 PM
01-11-2006 07:24 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
but after runing the dbshut script says:
ksh: LD_LIBRARY_PATH: parameter not set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 08:38 PM
01-11-2006 08:38 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
where and how to check the correct Environemnt is set ?
I think the environemnt is not correct set by doing su - oracle(user)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 09:03 PM
01-11-2006 09:03 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
three places to check!
1. the script itself
2. the /etc/profile
3. the .profile in the user home
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 09:57 PM
01-11-2006 09:57 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
Change where it says shutdown to shutdown immediate.
Environment:
/etc/profile
/home directory/.profile
Anything sourced from in there.
The oracle start/stop scripts provided also set environment.
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
01-11-2006 10:15 PM
01-11-2006 10:15 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
....
case $VERSION in
"6") sqldba command=shutdown ;;
"internal") $SQLDBA <
shutdown immediate
EOF
;;
*) $SQLDBA <
shutdown immediate
EOF
............
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 12:02 AM
01-12-2006 12:02 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
dbshut makes use of the ORATAB. Did you verify this?
it should contain something like:
mydb:/u01/app/oracle/product/8.1.7:Y
regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 12:11 AM
01-12-2006 12:11 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
attached a copy of the dbshut script that you may wish to verify with that of yours.
I would not recommend using dbstart and dbshut though. This is because you cannot control it completely. I never use dbstart/dbshut.
starting and stopping a database typically involves MORE than just the database.
I use an "orastart" script to do whatever I need to have done -- eg:
"start listener,
start db,
start processes that need to be running when db is up"
with dbstart you get
start db
and that is all....
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 12:18 AM
01-12-2006 12:18 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
You asked how to check how your environment is/was setup.
A simple way is to add 'env' to your script.
If you run the script via 'cron' or 'at', without redirection of the 'env' call, a mail message will be generated detailing the various envioronmental settings. Otherwise you can redirect the output of 'env' to a file of your choice.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 12:36 AM
01-12-2006 12:36 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
first thanks for the reply
Yogeeraj : can u tell me mor about orastart/orastop , where to find the script an may you can attack one script
thanks in advance;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 02:00 AM
01-12-2006 02:00 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
For 9i I write a small shutdown piece of sql and then run it to shut down 9i databases.
it runs from sqlplus. I start databases in a similar manner.
...
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 09:00 AM
01-12-2006 09:00 AM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 03:57 PM
01-12-2006 03:57 PM
Re: Oracle 9i HPUX 11. 64 bit Startup/shutdown
Your orastart script will be as such:
echo "/app/oracle/product/9.2/bin/lsnrctl start "| su - oracle
echo "/app/oracle/product/9.2/bin/sqlplus /nolog <