- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- remsh oracle shutdown/startup
Operating System - HP-UX
1753774
Members
6405
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО06-10-2002 02:54 PM
тАО06-10-2002 02:54 PM
I am trying to incorporate oracle shutdown/startup scripts into a script that syncs primary luns to business copy luns in a san environment. The bc luns reside on a management server and I use remsh to unmount the remote primary luns. I thought that this would work for oracle scripts as well but am getting errors from svrmgr (mgr-11401) when it tries to execute the scripts that work natively. I can get the scripts to run via rlogin but would like to automate it from the bc lun machine. I hesitate to cron since I then have to ensure , in the script, that clocks are in sync. Any thoughts on this would be much appreciated. TIA
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2002 04:03 PM
тАО06-10-2002 04:03 PM
Re: remsh oracle shutdown/startup
What are the errors? Perhaps the script needs to source the account's profile to set up the environment properly through remsh. This isn't likely to be a problem through rlogin.
If the script uses korn, bourne, or posix shell, then putting this at the top may help:
# no tty or profiles via remsh,
# so do it myself
if [ ! -t 0 ]
then
eval . ~$(id -un)/.profile
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2002 04:43 PM
тАО06-10-2002 04:43 PM
Solution
You will want to create a script to perform the shutdown/startup first, and then remsh that. The problem that you are having is that you cannot set the enviroment variables through the remsh.
The following would be an example.
shutdownDB:
-------------------
#!/bin/sh
export ORACLE_SID=ORADB
export ORACLE_HOME=/opt/oracle/product/8.1.6
export PATH=$ORACLE_HOME/bin:$PATH
svrmgrl <> /dev/null
spool /opt/oracle/log/shutdown.log
connect internal
shutdown abort;
startup restrict;
shutdown immediate;
exit;
!
if [ `grep ORA- /opt/oracle/log/shutdown.log | wc -l` -ne 0 ]; then
exit 1;
else
exit 0;
fi
-------------------
then you can perform the following:
remsh hostA -n /opt/oracle/bin/shutdownDB
if [ $? -eq 1 ]; then
; Unlink LUN's
fi
NOTE: We do not shutdown the database, but put the database into online backup mode (only valid for ARCHIVELOG mode). This keeps the database up during the split, but does require the logfiles to be backed up at a later time.
Brian
The following would be an example.
shutdownDB:
-------------------
#!/bin/sh
export ORACLE_SID=ORADB
export ORACLE_HOME=/opt/oracle/product/8.1.6
export PATH=$ORACLE_HOME/bin:$PATH
svrmgrl <> /dev/null
spool /opt/oracle/log/shutdown.log
connect internal
shutdown abort;
startup restrict;
shutdown immediate;
exit;
!
if [ `grep ORA- /opt/oracle/log/shutdown.log | wc -l` -ne 0 ]; then
exit 1;
else
exit 0;
fi
-------------------
then you can perform the following:
remsh hostA -n /opt/oracle/bin/shutdownDB
if [ $? -eq 1 ]; then
; Unlink LUN's
fi
NOTE: We do not shutdown the database, but put the database into online backup mode (only valid for ARCHIVELOG mode). This keeps the database up during the split, but does require the logfiles to be backed up at a later time.
Brian
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP