- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- svrmgrl won't run sql command
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
тАО07-05-2002 03:34 AM
тАО07-05-2002 03:34 AM
I have created a backup.cmd file and put it in crontab to stop & start Oracle database for backup purposes.
However, the script that I put in the crontab would not stop & start the database. So all the backup data cannot be used because the database is still open when the cp command work.
Attached, is the backup.cmd. stop.sql and start.sql that I used.
This is the entry in crontab:
* 2 * * 2,3,4,5,6 (. .profile; /uo3/oracle/script/backup.cmd) > cronerr 2>&1
The error message in the cronerr.
---------------------------------------
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2
Oracle Server Manager Release 3.1.6.0.0 - Production
Message 4505 not found; No message file for product=SVRMGR, facility=MGR
Error while trying to retrieve text for error ORA-12547
SVRMGR>
Message 37 not found; No message file for product=SVRMGR, facility=MGR
Oracle Server Manager Release 3.1.6.0.0 - Production
Message 4505 not found; No message file for product=SVRMGR, facility=MGR
Error while trying to retrieve text for error ORA-12547
SVRMGR>
Message 37 not found; No message file for product=SVRMGR, facility=MGR
-----------------------------------------------
From oracle website, ORA-12547 means that ORACLE_SID is not set and exported. However, I had inserted export ORACLE_SID=PROD command in my backup.cmd file.
I can still stop & start the database manually without any error. I'm using HP-UX 11.0 and Oracle 8.1.6 database.
Thank you for your help
Rizal Sharif
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 03:40 AM
тАО07-05-2002 03:40 AM
Re: svrmgrl won't run sql command
Seems to be with the oracle
ora 12547
12547, 00000, "TNS:lost contact"
// *Cause: Partner has unexpectedly gone away, usually during process
// startup.
// *Action: Investigate partner application for abnormal termination. On an
// Interchange, this can happen if the machine is overloaded.
would suggest you log a parallel call with oracle
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:05 AM
тАО07-05-2002 04:05 AM
Re: svrmgrl won't run sql command
Oracle Server Manager Release 3.1.6.0.0 - Production
Message 4505 not found; No message file for product=SVRMGR
are consistent with $ORACLE_HOME/bin not being set in the PATH variable.
You need to ensure that the whole set of environment variables are being set in your script before calling any Oracle commands. You need (at least):
ORACLE_HOME
ORACLE_SID
PATH
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:06 AM
тАО07-05-2002 04:06 AM
Re: svrmgrl won't run sql command
Can you get into server manager from a standard shell prompt....
i.e. type:
# su - oracle
(login info is displayed....)
the type:
$ svrmgrl
which should bring you to a SVRMGR> prompt
If this works, the problem is in how you are calling this from your script... I assume this is the oracle users crontab, not the root crontab, as by default root isn't allowed to do a 'connect internal'
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:13 AM
тАО07-05-2002 04:13 AM
Solutionexport ORACLE_SID=PROD
export ORACLE_HOME=/uo1/oracle/product/8.1.6
export PATH=$PATH:$ORACLE_HOME/bin
su oracle -c svrmgrl << EOD
connect internal ;
shutdown immediate ;
exit;
EOD
rm /uo3/oradbuo3bak/prod/*
rm /uo4/oradbuo4bak/prod/*
cp /uo3/oradb/prod/*.* /uo3/oradbuo3bak/prod
cp /uo4/oradb/prod/*.* /uo4/oradbuo4bak/prod
su oracle -c svrmgrl << EOD
connect internal ;
startup pfile=/uo3/oradb/prod/initprod.ora ;
exit;
EOD
fbackup -f /dev/rmt/0m ii /uo3/oradbuo3bak/prod -i /uo4/oradbuo4bak/prod 2>> /tmp/back.err
With a root crontab entry like this:
* 2 * * 2,3,4,5,6 /uo3/oracle/script/backup.cmd > cronerr 2>&1
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:17 AM
тАО07-05-2002 04:17 AM
Re: svrmgrl won't run sql command
svrmgr> connect internal
svrmgr> shutdown immediate
.. and do the backup.
This is what I done when I do manual backup.
In this case, I've informed the all users not to use the system from 2.00 a.m till 3.00 a.m. and run the backup script.
The crontab is for oracle user.
Rizal Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:26 AM
тАО07-05-2002 04:26 AM
Re: svrmgrl won't run sql command
I will try what you have suggested and post the results & assigned points later.
Regards
Rizal Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 04:41 AM
тАО07-05-2002 04:41 AM
Re: svrmgrl won't run sql command
But, when I login as oracle, there is no error message when I type svrmgrl.
Regards
Rizal Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2002 05:25 AM
тАО07-05-2002 05:25 AM
Re: svrmgrl won't run sql command
ORACLE_SID, ORACLE_HOME, ORACLE_BASE, ORACLE_TERM, LD_LIBRARY_PATH, ORA_NLS33, ORA_NLS, PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2002 03:39 PM
тАО07-08-2002 03:39 PM
Re: svrmgrl won't run sql command
In this case, svrmgrl (sqlplus, exp, imp, rman, etc) are looking for message and error files under your enviroment variable ORACLE_HOME, or in your current path. When it cant find it, you will get the error messages that you stated.
Why you are getting this when you do an "su - oracle", I'm not sure, as it should be loading your enviroment, and it sounds like you are using a .profile on your oracle account.
With cron however, your enviroment is not loaded when commands are run, but are run 'as-is' from a shell with your user's rights.
Hope this clears up any confusion you have.
Brian