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
тАО01-25-2005 10:26 PM
тАО01-25-2005 10:26 PM
I am using sudo on HP 11.11 and running fbackup within OPER menu i.e /usr/sbin/fbackup it is working fine. I want to shutdown oracle database with same command, but it is not working. I am getting massage:
$ /usr/local/bin/sudo -u oracle9 shutdown_PRIM.sql
/usr/local/bin/sudo: unable to exec shutdown_PRIM.sql: Permission denied
$ /usr/local/bin/sudo shutdown_PRIM.sql
./shutdown_PRIM.sql[3]: sqlplus: not found.
Please someone can help.
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 12:07 AM
тАО01-26-2005 12:07 AM
Re: sudo
have you chaecked the Unix permissions on the sql file.
Ensure that the PATH variable include the location of sqlplus ($ORACLE_HOME/bin)
Please close tread if resolved.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 12:08 AM
тАО01-26-2005 12:08 AM
Re: sudo
set > oracle9.env
Now you have a picture of what the correct environment should be. oracle9.env then becomes the beginning of your script to run shutdown_PRIM.sql by having all the correct variables set. Or, you can look through /etc/profile and $HOME/.profile to see where Oracle-specific variables are setup and copy that into your script. Now your sudo command will run the script and not the sql code by itself. Be sure to read the details about Security in the sudo man pages where it talks about the environment.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 12:43 AM
тАО01-26-2005 12:43 AM
Solutionsudo su - oracle9 -c 'export ORACLE_SID=YOUR_SID; sqlplus /nolog @/path/to/your/file/shutdown_PRIM
And this sql file should look like this:
cat /path/to/your/file/shutdown_PRIM.sql
connect /as sysdba
shutdown immediate
exit
Or you could do:
sudo su - oracle9 "export ORACLE_SID=YOUR_SID; echo \"connect internal;\n shutdown immediate;\"|svrmgrl"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 05:18 PM
тАО01-26-2005 05:18 PM
Re: sudo
Thanks to all for assistance, I can shutdown and startup oracle database.
Mehmood
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 05:20 PM
тАО01-26-2005 05:20 PM
Re: sudo
Thanks to Peter,Bill and Jannik to assistance, now I can shutdown and startup database and listner.
Regards and thanks to all.
Mehmood