- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help writng script
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
09-18-2002 04:44 AM
09-18-2002 04:44 AM
Help writng script
# su - oracle
$ csh
$ dserv_shutdown
$ exit
$ exit
when I put these commands into a script it seems to only execute the first line. Am I doing soemthing wrong or do I need to go about doing this a different way??
Thanks for any advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 04:50 AM
09-18-2002 04:50 AM
Re: Help writng script
su - oracle -c <script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 04:51 AM
09-18-2002 04:51 AM
Re: Help writng script
try putting those commands after su - oracle in a script and running
su - oracle -c <script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:04 AM
09-18-2002 05:04 AM
Re: Help writng script
-Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:26 AM
09-18-2002 05:26 AM
Re: Help writng script
If your backup script runs as root, would it do to just have the dserv_shutdown line in the script directly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:38 AM
09-18-2002 05:38 AM
Re: Help writng script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:46 AM
09-18-2002 05:46 AM
Re: Help writng script
00 02 * * 0-6 /script/name > /output/log 2>&1
Within the script we call several other scripts, including the one that actually shuts the DB down and performs the backup. It is called like:
/bin/su - oracle7 - c "/script/name1"
Works pretty well for us.
HTH
KJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:49 AM
09-18-2002 05:49 AM
Re: Help writng script
KJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 06:54 AM
09-18-2002 06:54 AM
Re: Help writng script
this should work:
su - oracle -c "/bin/csh -c dserv_shutdown"
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:25 AM
09-18-2002 07:25 AM
Re: Help writng script
Hi
Once U do su, then U are in different environment. Actually, the commands after #su - oracle are not taking in to effect. U can see the outputs in the old environment.
Solution is either U do like this
#su - oracle -c "csh dserv_shutdown"
Or
Create a script with the commands except su command and then
#su - oracle -c "cat /tmp/script"
This both will work.
Best of luck
Shahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 10:41 AM
09-18-2002 10:41 AM
Re: Help writng script
how about:
su - oracle <
EOF
That should do the trick...
Regards,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 12:35 PM
09-18-2002 12:35 PM
Re: Help writng script
First create a script in oracle's path - say oracle_stop.
Then, from your backup server:
`/bin/su - oracle -c "oracle_stop"`