<?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: Help writng script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808633#M83703</link>
    <description>in english this time:&lt;BR /&gt;try putting those commands after su - oracle in a script and running&lt;BR /&gt;su - oracle -c &amp;lt;script&amp;gt;</description>
    <pubDate>Wed, 18 Sep 2002 11:51:39 GMT</pubDate>
    <dc:creator>Neil Haslum_1</dc:creator>
    <dc:date>2002-09-18T11:51:39Z</dc:date>
    <item>
      <title>Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808631#M83701</link>
      <description>I am trying to write a script to shutdown a database so it can be incorporated into my backup.  When I type the following commands at the command line as root it works no problem:&lt;BR /&gt;&lt;BR /&gt;# su - oracle&lt;BR /&gt;$ csh&lt;BR /&gt;$ dserv_shutdown&lt;BR /&gt;$ exit&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;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??&lt;BR /&gt;&lt;BR /&gt;Thanks for any advice.</description>
      <pubDate>Wed, 18 Sep 2002 11:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808631#M83701</guid>
      <dc:creator>Eric Shupe</dc:creator>
      <dc:date>2002-09-18T11:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808632#M83702</link>
      <description>try putting those commands after su - oracle and running &lt;BR /&gt;su - oracle -c &amp;lt;script&amp;gt;</description>
      <pubDate>Wed, 18 Sep 2002 11:50:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808632#M83702</guid>
      <dc:creator>Neil Haslum_1</dc:creator>
      <dc:date>2002-09-18T11:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808633#M83703</link>
      <description>in english this time:&lt;BR /&gt;try putting those commands after su - oracle in a script and running&lt;BR /&gt;su - oracle -c &amp;lt;script&amp;gt;</description>
      <pubDate>Wed, 18 Sep 2002 11:51:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808633#M83703</guid>
      <dc:creator>Neil Haslum_1</dc:creator>
      <dc:date>2002-09-18T11:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808634#M83704</link>
      <description>Your first command is switching users, so it probably needs a password authentication, and is not getting it.  You need to log into oracle first, or authenticate the user through the script.&lt;BR /&gt;&lt;BR /&gt;-Allan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Sep 2002 12:04:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808634#M83704</guid>
      <dc:creator>Allan Pincus</dc:creator>
      <dc:date>2002-09-18T12:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808635#M83705</link>
      <description>Switching shells is the problem, I think.  The 'csh' line for example, opens a new environment space that knows nothing about the previous one, including the script that may be running.  Do you need to be in csh (or, do you need to be user oracle) to shut down the database?&lt;BR /&gt;&lt;BR /&gt;If your backup script runs as root, would it do to just have the dserv_shutdown line in the script directly?&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Sep 2002 12:26:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808635#M83705</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2002-09-18T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808636#M83706</link>
      <description>In order to shutdown the database it must be user oracle and it must be in the C shell.  root cannot stop it.  there are a bunch of variables set within user oracle.</description>
      <pubDate>Wed, 18 Sep 2002 12:38:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808636#M83706</guid>
      <dc:creator>Eric Shupe</dc:creator>
      <dc:date>2002-09-18T12:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808637#M83707</link>
      <description>We have a "master script" to run our Oracle DB backkups.  Our cron entry looks like:&lt;BR /&gt;&lt;BR /&gt;00 02 * * 0-6 /script/name &amp;gt; /output/log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;/bin/su - oracle7 - c "/script/name1"&lt;BR /&gt;&lt;BR /&gt;Works pretty well for us.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;KJ&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Sep 2002 12:46:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808637#M83707</guid>
      <dc:creator>Keith Johnson</dc:creator>
      <dc:date>2002-09-18T12:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808638#M83708</link>
      <description>Forgot to mention that we run this from the root cron.&lt;BR /&gt;&lt;BR /&gt;KJ</description>
      <pubDate>Wed, 18 Sep 2002 12:49:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808638#M83708</guid>
      <dc:creator>Keith Johnson</dc:creator>
      <dc:date>2002-09-18T12:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808639#M83709</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;this should work:&lt;BR /&gt;&lt;BR /&gt;su - oracle -c "/bin/csh -c dserv_shutdown"&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 18 Sep 2002 13:54:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808639#M83709</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2002-09-18T13:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808640#M83710</link>
      <description>&lt;BR /&gt; Hi&lt;BR /&gt;&lt;BR /&gt;  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.&lt;BR /&gt;&lt;BR /&gt;  Solution is either U do like this&lt;BR /&gt;&lt;BR /&gt;#su - oracle -c "csh dserv_shutdown"&lt;BR /&gt;&lt;BR /&gt; Or&lt;BR /&gt;&lt;BR /&gt;Create a script with the commands except su command and then&lt;BR /&gt;&lt;BR /&gt;#su - oracle -c "cat /tmp/script"&lt;BR /&gt;&lt;BR /&gt;  This both will work.&lt;BR /&gt;&lt;BR /&gt;Best of luck&lt;BR /&gt;Shahul</description>
      <pubDate>Wed, 18 Sep 2002 14:25:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808640#M83710</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2002-09-18T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808641#M83711</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;how about:&lt;BR /&gt;&lt;BR /&gt;su - oracle &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;csh -c dserv_shutdown&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;That should do the trick...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Sep 2002 17:41:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808641#M83711</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-09-18T17:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help writng script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808642#M83712</link>
      <description>A good way to do this is like:&lt;BR /&gt;&lt;BR /&gt;First create a script in oracle's path - say oracle_stop.&lt;BR /&gt;&lt;BR /&gt;Then, from your backup server:&lt;BR /&gt;&lt;BR /&gt;`/bin/su - oracle -c "oracle_stop"`</description>
      <pubDate>Wed, 18 Sep 2002 19:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-writng-script/m-p/2808642#M83712</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2002-09-18T19:35:27Z</dc:date>
    </item>
  </channel>
</rss>

