<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: svrmgrl won't run sql command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758418#M945065</link>
    <description>Rizal,&lt;BR /&gt;&lt;BR /&gt;Can you get into server manager from a standard shell prompt....&lt;BR /&gt;&lt;BR /&gt;i.e. type:&lt;BR /&gt;&lt;BR /&gt;# su - oracle&lt;BR /&gt;&lt;BR /&gt;(login info is displayed....)&lt;BR /&gt;&lt;BR /&gt;the type:&lt;BR /&gt;&lt;BR /&gt;$ svrmgrl&lt;BR /&gt;&lt;BR /&gt;which should bring you to a SVRMGR&amp;gt; prompt&lt;BR /&gt;&lt;BR /&gt;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'&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
    <pubDate>Fri, 05 Jul 2002 11:06:22 GMT</pubDate>
    <dc:creator>Duncan Edmonstone</dc:creator>
    <dc:date>2002-07-05T11:06:22Z</dc:date>
    <item>
      <title>svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758415#M945062</link>
      <description>Hi all,&lt;BR /&gt; &lt;BR /&gt;I have created a backup.cmd file and put it in crontab  to stop &amp;amp; start Oracle database for backup purposes.&lt;BR /&gt;However, the script that I put in the crontab would not stop &amp;amp; start the database. So all the backup data cannot be used because the database is still open when the cp command work.&lt;BR /&gt;&lt;BR /&gt;Attached, is the backup.cmd. stop.sql  and start.sql that I used.&lt;BR /&gt;&lt;BR /&gt;This is the entry in crontab:&lt;BR /&gt;&lt;BR /&gt;* 2 * * 2,3,4,5,6 (. .profile; /uo3/oracle/script/backup.cmd) &amp;gt; cronerr 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The error message in the cronerr.&lt;BR /&gt;---------------------------------------&lt;BR /&gt;Not a terminal&lt;BR /&gt;stty: : Not a typewriter&lt;BR /&gt;stty: : Not a typewriter&lt;BR /&gt;&lt;BR /&gt;  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2  ^2&lt;BR /&gt;                                              Oracle Server Manager Release 3.1.6.0.0 - Production&lt;BR /&gt;Message 4505 not found; No message file for product=SVRMGR, facility=MGR&lt;BR /&gt;Error while trying to retrieve text for error ORA-12547&lt;BR /&gt;SVRMGR&amp;gt; &lt;BR /&gt;Message 37 not found; No message file for product=SVRMGR, facility=MGR&lt;BR /&gt;Oracle Server Manager Release 3.1.6.0.0 - Production&lt;BR /&gt;Message 4505 not found; No message file for product=SVRMGR, facility=MGR&lt;BR /&gt;Error while trying to retrieve text for error ORA-12547&lt;BR /&gt;SVRMGR&amp;gt; &lt;BR /&gt;Message 37 not found; No message file for product=SVRMGR, facility=MGR&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;I can still stop &amp;amp; start the database manually without any error. I'm using HP-UX 11.0 and Oracle 8.1.6 database.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;BR /&gt;&lt;BR /&gt;Rizal Sharif&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2002 10:34:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758415#M945062</guid>
      <dc:creator>Rizal Sharif</dc:creator>
      <dc:date>2002-07-05T10:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758416#M945063</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Seems to be with the oracle&lt;BR /&gt;&lt;BR /&gt;ora 12547&lt;BR /&gt;12547, 00000, "TNS:lost contact"&lt;BR /&gt;// *Cause: Partner has unexpectedly gone away, usually during process&lt;BR /&gt;// startup.&lt;BR /&gt;// *Action: Investigate partner application for abnormal termination. On an&lt;BR /&gt;// Interchange, this can happen if the machine is overloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;would suggest you log a parallel call with oracle&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;              Steve Steel</description>
      <pubDate>Fri, 05 Jul 2002 10:40:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758416#M945063</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-07-05T10:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758417#M945064</link>
      <description>The error messages:&lt;BR /&gt;Oracle Server Manager Release 3.1.6.0.0 - Production &lt;BR /&gt;Message 4505 not found; No message file for product=SVRMGR&lt;BR /&gt;&lt;BR /&gt;are consistent with $ORACLE_HOME/bin not being set in the PATH variable.&lt;BR /&gt;&lt;BR /&gt;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):&lt;BR /&gt;ORACLE_HOME&lt;BR /&gt;ORACLE_SID&lt;BR /&gt;PATH&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Fri, 05 Jul 2002 11:05:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758417#M945064</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-07-05T11:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758418#M945065</link>
      <description>Rizal,&lt;BR /&gt;&lt;BR /&gt;Can you get into server manager from a standard shell prompt....&lt;BR /&gt;&lt;BR /&gt;i.e. type:&lt;BR /&gt;&lt;BR /&gt;# su - oracle&lt;BR /&gt;&lt;BR /&gt;(login info is displayed....)&lt;BR /&gt;&lt;BR /&gt;the type:&lt;BR /&gt;&lt;BR /&gt;$ svrmgrl&lt;BR /&gt;&lt;BR /&gt;which should bring you to a SVRMGR&amp;gt; prompt&lt;BR /&gt;&lt;BR /&gt;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'&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Fri, 05 Jul 2002 11:06:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758418#M945065</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2002-07-05T11:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758419#M945066</link>
      <description>Try the following:&lt;BR /&gt;&lt;BR /&gt;export ORACLE_SID=PROD&lt;BR /&gt;export ORACLE_HOME=/uo1/oracle/product/8.1.6&lt;BR /&gt;export PATH=$PATH:$ORACLE_HOME/bin&lt;BR /&gt;su oracle -c svrmgrl  &amp;lt;&amp;lt; EOD&lt;BR /&gt;connect internal ;&lt;BR /&gt;shutdown immediate ;&lt;BR /&gt;exit;&lt;BR /&gt;EOD&lt;BR /&gt;rm /uo3/oradbuo3bak/prod/*&lt;BR /&gt;rm /uo4/oradbuo4bak/prod/*&lt;BR /&gt;cp /uo3/oradb/prod/*.* /uo3/oradbuo3bak/prod&lt;BR /&gt;cp /uo4/oradb/prod/*.* /uo4/oradbuo4bak/prod&lt;BR /&gt;su oracle -c svrmgrl &amp;lt;&amp;lt; EOD&lt;BR /&gt;connect internal ;&lt;BR /&gt;startup pfile=/uo3/oradb/prod/initprod.ora ;&lt;BR /&gt;exit;&lt;BR /&gt;EOD&lt;BR /&gt;fbackup -f /dev/rmt/0m ii /uo3/oradbuo3bak/prod  -i /uo4/oradbuo4bak/prod 2&amp;gt;&amp;gt; /tmp/back.err&lt;BR /&gt;&lt;BR /&gt;With a root crontab entry like this:&lt;BR /&gt;&lt;BR /&gt;* 2 * * 2,3,4,5,6 /uo3/oracle/script/backup.cmd &amp;gt; cronerr 2&amp;gt;&amp;amp;1 &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Fri, 05 Jul 2002 11:13:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758419#M945066</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2002-07-05T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758420#M945067</link>
      <description>Yes, I can get into server manager from standard shell prompt and stop the database. &lt;BR /&gt;&lt;BR /&gt;svrmgr&amp;gt; connect internal&lt;BR /&gt;svrmgr&amp;gt; shutdown immediate&lt;BR /&gt;&lt;BR /&gt;.. and do the backup.&lt;BR /&gt;&lt;BR /&gt;This is what I done when I do manual backup.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;The crontab is for oracle user.&lt;BR /&gt;&lt;BR /&gt;Rizal Sharif</description>
      <pubDate>Fri, 05 Jul 2002 11:17:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758420#M945067</guid>
      <dc:creator>Rizal Sharif</dc:creator>
      <dc:date>2002-07-05T11:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758421#M945068</link>
      <description>Thanks Duncan ,&lt;BR /&gt;&lt;BR /&gt;I will try what you have suggested and post the results &amp;amp; assigned points later. &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Rizal Sharif&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2002 11:26:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758421#M945068</guid>
      <dc:creator>Rizal Sharif</dc:creator>
      <dc:date>2002-07-05T11:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758422#M945069</link>
      <description>For your info, when I login as a root, su - oracle and type svrmgrl the same error message appeared as in cronerr.&lt;BR /&gt;But, when I login as oracle, there is no error message when I type svrmgrl. &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Rizal Sharif&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2002 11:41:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758422#M945069</guid>
      <dc:creator>Rizal Sharif</dc:creator>
      <dc:date>2002-07-05T11:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758423#M945070</link>
      <description>I have to agree with John Palmer.  It looks to me like the problme is your path (and any other env variables that Oracle might need) are not being set correctly.  What I usually do is call a standard program (oraenv, but modified a bit) to set all of the oracle required variables from within each shell script that I call.  The variables I set are:&lt;BR /&gt;ORACLE_SID, ORACLE_HOME, ORACLE_BASE, ORACLE_TERM, LD_LIBRARY_PATH, ORA_NLS33, ORA_NLS, PATH.</description>
      <pubDate>Fri, 05 Jul 2002 12:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758423#M945070</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-07-05T12:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758424#M945071</link>
      <description>You have gotten the correct information in what is wrong, but I will elaborate on what is happening.  &lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;Hope this clears up any confusion you have.  &lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Mon, 08 Jul 2002 22:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758424#M945071</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2002-07-08T22:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: svrmgrl won't run sql command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758425#M945072</link>
      <description>Thank you to all of you &amp;amp; especially to Duncan, for pointing me the right track on how to make the script works.&lt;BR /&gt;&lt;BR /&gt;After I put all the necessary Oracle variables in the .profile, the error message disappeared.&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Rizal Sharif&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jul 2002 04:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/svrmgrl-won-t-run-sql-command/m-p/2758425#M945072</guid>
      <dc:creator>Rizal Sharif</dc:creator>
      <dc:date>2002-07-09T04:07:47Z</dc:date>
    </item>
  </channel>
</rss>

