- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: database startup
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
тАО04-03-2008 03:40 AM
тАО04-03-2008 03:40 AM
database startup
we are using the oracle 10g database on hp ux 11.23 version
the following script we are trying to auto start and shutdown database and lsn on startup
# installation
ORACLE_HOME=/u01/app/oracle/OraHome_1
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST='hostname'
#
# change the value of ORACLE to the login name of the
# oracle owner at your site
#
export ORACLE_HOME PATH
su - $ORACLE -c "$0 $1 ORA_DB"
##
if [ ! "$2" = "ORA_DB" ] ; then
ssh -l $HOST $ORACLE /sbin/init.d/oradba $1 ORA_DB
exit
fi
#
LOG=$ORACLE_HOME/startup1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl start >> $LOG 2>&1 &
fi
echo "starting Oracle databases"
$ORACLE_HOME/bin/dbstart >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl stop >> $LOG 2>&1
fi
echo "stopping Oracle databases"
$ORACLE_HOME/bin/dbshut >> $LOG 2>&1
;;
*)
echo "usage: $0 {start|stop}".
exit
;;
esac
#
exit
RACLE_HOME=/u01/app/oracle/OraHome_1
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST='hostname'
#
# change the value of ORACLE to the login name of the
# oracle owner at your site
#
export ORACLE_HOME PATH
su - $ORACLE -c "$0 $1 ORA_DB"
##
if [ ! "$2" = "ORA_DB" ] ; then
rsh $HOST -l $ORACLE /sbin/init.d/oradba $1 ORA_DB
exit
fi
#
LOG=$ORACLE_HOME/startup1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl start >> $LOG 2>&1 &
fi
echo "starting Oracle databases"
$ORACLE_HOME/bin/dbstart >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl stop >> $LOG 2>&1
script directory
=/sbin/init.d
script output
bash-3.2# ./dbora start
+ ORACLE_HOME=/u01/app/oracle/OraHome_1
+ ORACLE=oracle
+ PATH=/usr/sbin:/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:/sbin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/sas/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/graphics/common/bin:/opt/sfm/bin:/opt/hpsmh/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/thunderbird:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/langtools/bin:/opt/caliper/bin:/opt/sentinel/bin:/usr/local/bin:/bin
+ + hostname
HOST=posserve.ciegroup.net
+ + uname
PLATFORM=HP-UX
+ export ORACLE_HOME PATH
+ i#
./dbora[17]: i#: not found.
+ [ ! = ORA_DB ]
+ echo
+ [ HP-UX = HP-UX ]
+ su - oracle -c ./dbora start ORA_DB
(c)Copyright 1983-2003 Hewlett-Packard Development Company, L.P.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-2000 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2003 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
+ exit
pls provide me the input to resolve the problem
thanks
rakesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 04:08 AM
тАО04-03-2008 04:08 AM
Re: database startup
Possibilities:
1) Pam is configured so the su - startup option does not work and the script is prompted for a password.
2) Script error.
In either event, set -x the script and modify its run so that output goes to a file. Then maybe you'll at least have some idea what went wrong.
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
тАО04-03-2008 08:48 AM
тАО04-03-2008 08:48 AM
Re: database startup
At first sight, there seem to be an error in your script! see line:
> RACLE_HOME=/u01/app/oracle/OraHome_1
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 08:09 PM
тАО04-03-2008 08:09 PM
Re: database startup
clarification:
you wrote:
RACLE_HOME=/u01/app/oracle/OraHome_1
instead of:
ORACLE_HOME=/u01/app/oracle/OraHome_1
also, when you are launching command:
./dbora start
it explicitly means that dbora script is in the current directory.
Also, is this HP-UX or Linux?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 08:23 PM
тАО04-03-2008 08:23 PM
Re: database startup
Please put the full absolute path of "dbora" and then try.
su - oracle -c /fullpath/dbora start ORA_DB
Thanks
Aashique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 12:51 AM
тАО04-04-2008 12:51 AM
Re: database startup
thanks foy u respons
in script it is
ORACLE_HOME=/u01/app/oracle_OraHome_1
the script directory is
/sbin/init.sd/
permission under root & oracle user
-rwxr-x--- 1 root dba 679 Apr 3 16:39 dbora
This script is ruuning on hp ux 11.23
/usr/bin/csh default shell for oracle
/user/ust/bin/sh default shell for root
thanks
rakesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 09:37 PM
тАО04-04-2008 09:37 PM
Re: database startup
need to have a look at the dbora script. Did u make any changes?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 09:46 PM
тАО04-04-2008 09:46 PM
Re: database startup
no changes made till we posted this issue
thanks
rakesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2008 10:21 PM
тАО04-06-2008 10:21 PM
Re: database startup
i think problem with this script
ssh not able switch oracle
how i can resolve it
thaanks
rakesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2008 04:19 AM
тАО04-08-2008 04:19 AM
Re: database startup
>ssh not able switch oracle
Where did you find ssh in the script?
Can you post your scripts for review?
revert.
kind regards
yogeeraj