<?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: Running db admin scripts as root in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075420#M809293</link>
    <description>Joe, how about a few points for helping????&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Fri, 19 Sep 2003 18:44:47 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-09-19T18:44:47Z</dc:date>
    <item>
      <title>Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075417#M809290</link>
      <description>I'm working on including my Oracle admin scripts within my 'pre' and 'post' scripts (using Omniback II) to simplify my backups but am hitting some road blocks due to the Oracle environment not being able to run server mgr. as root.  I'd be grateful if anyone has a simple suggestion how I can run those scripts (owned by the Oracle account) as root...&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 18:19:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075417#M809290</guid>
      <dc:creator>Joe Robinson_2</dc:creator>
      <dc:date>2003-09-19T18:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075418#M809291</link>
      <description>The script can have them like this:&lt;BR /&gt;&lt;BR /&gt;/usr/bin/su - oracle -c "command"&lt;BR /&gt;&lt;BR /&gt;Run out of root cron, this will run without a password prompt.&lt;BR /&gt;&lt;BR /&gt;It is never a good idea to run databse scripts as root.&lt;BR /&gt;&lt;BR /&gt;It can tie up shared memory resources, lock your database, all kinds of ugly things.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 18:26:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075418#M809291</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T18:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075419#M809292</link>
      <description>good one...I use that for the few times when I'm doing support on the floor and need to run a command as a different user (different from who I am working with) and walk away!  Thanks for the idea!&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 18:36:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075419#M809292</guid>
      <dc:creator>Joe Robinson_2</dc:creator>
      <dc:date>2003-09-19T18:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075420#M809293</link>
      <description>Joe, how about a few points for helping????&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 18:44:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075420#M809293</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T18:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075421#M809294</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;You're shameless!&lt;BR /&gt;&lt;BR /&gt;;^)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 18:47:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075421#M809294</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-09-19T18:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075422#M809295</link>
      <description>There is a potential problem with using&lt;BR /&gt;/usr/bin/su - oracle -c "command" &lt;BR /&gt;rather than &lt;BR /&gt;/usr/bin/su oracle -c "command".&lt;BR /&gt;&lt;BR /&gt;I know that you want to load Oracle's environment var's (ORACLE_HOME,ORACLE_SID,..) but the problem is that oracle's .profile contains statements like tset, tabs, tput ... which expect an interactive environment --- which you ain't. You can surround all those with&lt;BR /&gt;if [ -t 0 ]&lt;BR /&gt;then&lt;BR /&gt;  tset&lt;BR /&gt;  stty&lt;BR /&gt;  tabs&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;but a better way is to create a file (oraenv.sh) that sets and exports all those variables and then let your script AND oracle's .profile source this file.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;. /usr/local/bin/oraenv.sh&lt;BR /&gt;&lt;BR /&gt;This will ensure that the environment is setup but not hang because no interactive environment is in play. Your oraenv.sh must not contain an exit or return statement because this would actually exit the shell because sourced files are not started as a separate process.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2003 18:57:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075422#M809295</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-09-19T18:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Running db admin scripts as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075423#M809296</link>
      <description>A Clay is as always right.&lt;BR /&gt;&lt;BR /&gt;My solution assumes that the oracle environment is correct.&lt;BR /&gt;&lt;BR /&gt;The script called by the command section needs to call the correct oracle environment for the database to be used.  ORACLE_HOME, ORACLE_SID and other required variables MUST be set or the script will fail.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 19:05:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-db-admin-scripts-as-root/m-p/3075423#M809296</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T19:05:39Z</dc:date>
    </item>
  </channel>
</rss>

