<?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: startup/shutdown script for oracle 8i database in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709005#M947232</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;First you'll have to get inplace the automatic startup script for starting oracle when startup of server:&lt;BR /&gt;&lt;BR /&gt;Update /etc/oratab with SID:ORACLE_HOME:Y line for your database. &lt;BR /&gt;&lt;BR /&gt;Put inplace init.d script dbora: &lt;BR /&gt;/sbin/init.d/dbora: &lt;BR /&gt;--- &lt;BR /&gt;#!/sbin/sh &lt;BR /&gt;# Start/stop of Oracle database &lt;BR /&gt;# &lt;BR /&gt;ORA_HOME=/oracle/product/8.1.7 &lt;BR /&gt;ORA_OWNER=oracle &lt;BR /&gt;if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] &lt;BR /&gt;then &lt;BR /&gt;echo "Oracle startup: cannot start" &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;case "$1" in &lt;BR /&gt;start_msg) &lt;BR /&gt;echo "Start ORACLE databases" &lt;BR /&gt;;; &lt;BR /&gt;&lt;BR /&gt;stop_msg) &lt;BR /&gt;echo "Stop ORACLE databases" &lt;BR /&gt;;; &lt;BR /&gt;'start') &lt;BR /&gt;# Start the oracle databases &lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &lt;BR /&gt;;; &lt;BR /&gt;'stop') &lt;BR /&gt;# Stop the oracle databases &lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &lt;BR /&gt;;; &lt;BR /&gt;esac &lt;BR /&gt;--- &lt;BR /&gt;&lt;BR /&gt;Create link to runlevel directories: &lt;BR /&gt;ln -s /sbin/init.d/dbora /sbin/rc0.d/K10dbora &lt;BR /&gt;ln -s /sbin/init.d/dbora /sbin/rc2.d/S99dbora &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You might also want to edit the $ORACLE_HOME/bin/dbshut script to read "shutdown immediate" instead of "shutdown" &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then simply use this script in your crontab:&lt;BR /&gt;01 00 * * /sbin/init.d/dbora stop &amp;gt;/tmp/orashut.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;00 06 * * /sbin/init.d/dbora start &amp;gt;/tmp/orastart.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
    <pubDate>Tue, 23 Apr 2002 11:46:23 GMT</pubDate>
    <dc:creator>Andreas D. Skjervold</dc:creator>
    <dc:date>2002-04-23T11:46:23Z</dc:date>
    <item>
      <title>startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709000#M947227</link>
      <description>Need assistance. MY OS is HPUX 11. I am in need of a script that I can use in a CRON to shutdown and startup my 8i database mon - fri, from 12 midnight to 6am.</description>
      <pubDate>Tue, 23 Apr 2002 10:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709000#M947227</guid>
      <dc:creator>Evella Dawson</dc:creator>
      <dc:date>2002-04-23T10:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709001#M947228</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;can't you use the normal start/stop script which should be installed in /sbin/init.d/oracle?&lt;BR /&gt;&lt;BR /&gt;I think if that this should produce the least problems. Just use cron to start/stop oracle with this script and redirect the output (STDOUT/STDERR) to a file or /dev/null&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Regards Stefan</description>
      <pubDate>Tue, 23 Apr 2002 10:57:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709001#M947228</guid>
      <dc:creator>Stefan Schulz</dc:creator>
      <dc:date>2002-04-23T10:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709002#M947229</link>
      <description>Hi !&lt;BR /&gt;&lt;BR /&gt;It's my script for shutdown and startup db.&lt;BR /&gt;&lt;BR /&gt;I have 2 instances of Oracle on my server and&lt;BR /&gt;necessary for me to switch oracle environment.&lt;BR /&gt;&lt;BR /&gt;Look these file:</description>
      <pubDate>Tue, 23 Apr 2002 11:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709002#M947229</guid>
      <dc:creator>Alexey A. Shumilin</dc:creator>
      <dc:date>2002-04-23T11:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709003#M947230</link>
      <description>How about something like this in roots crontab :-&lt;BR /&gt;&lt;BR /&gt;0 0 * * * su -oracle -c dbshut&lt;BR /&gt;0 6 * * * su -oracle -c dbstart&lt;BR /&gt;&lt;BR /&gt;It's been a while since I used oracle, but I recall Oralce supply scripts to do this. You'll just need the full path to dbshut and dbstart in roots crontab.&lt;BR /&gt;&lt;BR /&gt;cd $ORACLE_HOME&lt;BR /&gt;find . -name dbshut&lt;BR /&gt;find . -name dbstart&lt;BR /&gt;&lt;BR /&gt;On AIX they are in &lt;BR /&gt;&lt;BR /&gt;/u01/app/oracle/product/8.0.4/bin&lt;BR /&gt;&lt;BR /&gt;I imagine you'll find them in a similar place.&lt;BR /&gt;&lt;BR /&gt;Therefore the crontab entry would be this :-&lt;BR /&gt;&lt;BR /&gt;0 0 * * * su -oracle -c /u01/app/oracle/product/8.0.4/bin/dbshut&lt;BR /&gt;0 6 * * * su -oracle -c /u01/app/oracle/product/8.0.4/bin/dbstart&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Tue, 23 Apr 2002 11:14:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709003#M947230</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2002-04-23T11:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709004#M947231</link>
      <description>You might also want to create a script called dbabort based on dbshut that does a dbabort, dbstart and dbshut to ensure a clean shutdown if dbshut hangs due to users still being logged in.&lt;BR /&gt;&lt;BR /&gt;Put this in the crontab to run say 10 minutes after dbshut. If you want to do a backup, make sure it starts after dbabort has completed.&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Tue, 23 Apr 2002 11:27:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709004#M947231</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2002-04-23T11:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709005#M947232</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;First you'll have to get inplace the automatic startup script for starting oracle when startup of server:&lt;BR /&gt;&lt;BR /&gt;Update /etc/oratab with SID:ORACLE_HOME:Y line for your database. &lt;BR /&gt;&lt;BR /&gt;Put inplace init.d script dbora: &lt;BR /&gt;/sbin/init.d/dbora: &lt;BR /&gt;--- &lt;BR /&gt;#!/sbin/sh &lt;BR /&gt;# Start/stop of Oracle database &lt;BR /&gt;# &lt;BR /&gt;ORA_HOME=/oracle/product/8.1.7 &lt;BR /&gt;ORA_OWNER=oracle &lt;BR /&gt;if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] &lt;BR /&gt;then &lt;BR /&gt;echo "Oracle startup: cannot start" &lt;BR /&gt;exit &lt;BR /&gt;fi &lt;BR /&gt;case "$1" in &lt;BR /&gt;start_msg) &lt;BR /&gt;echo "Start ORACLE databases" &lt;BR /&gt;;; &lt;BR /&gt;&lt;BR /&gt;stop_msg) &lt;BR /&gt;echo "Stop ORACLE databases" &lt;BR /&gt;;; &lt;BR /&gt;'start') &lt;BR /&gt;# Start the oracle databases &lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &lt;BR /&gt;;; &lt;BR /&gt;'stop') &lt;BR /&gt;# Stop the oracle databases &lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &lt;BR /&gt;;; &lt;BR /&gt;esac &lt;BR /&gt;--- &lt;BR /&gt;&lt;BR /&gt;Create link to runlevel directories: &lt;BR /&gt;ln -s /sbin/init.d/dbora /sbin/rc0.d/K10dbora &lt;BR /&gt;ln -s /sbin/init.d/dbora /sbin/rc2.d/S99dbora &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You might also want to edit the $ORACLE_HOME/bin/dbshut script to read "shutdown immediate" instead of "shutdown" &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then simply use this script in your crontab:&lt;BR /&gt;01 00 * * /sbin/init.d/dbora stop &amp;gt;/tmp/orashut.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;00 06 * * /sbin/init.d/dbora start &amp;gt;/tmp/orastart.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
      <pubDate>Tue, 23 Apr 2002 11:46:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709005#M947232</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2002-04-23T11:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709006#M947233</link>
      <description>&lt;BR /&gt;HI David&lt;BR /&gt;&lt;BR /&gt;Thanks for the info. I have two Oracle SIDs.&lt;BR /&gt;&lt;BR /&gt;Will this process shutdown both? &lt;BR /&gt;Do I have to modify the dbabort(a copy of dbshut) inorder to shutdown if a user is still logged on? &lt;BR /&gt;If so, what do I have to change?</description>
      <pubDate>Tue, 23 Apr 2002 11:54:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709006#M947233</guid>
      <dc:creator>Evella Dawson</dc:creator>
      <dc:date>2002-04-23T11:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709007#M947234</link>
      <description>Hiya,&lt;BR /&gt;&lt;BR /&gt;dbstart, dbshut and dbabort will look at the 3rd field of /etc/oratab (location of oratab may be somewhere else). This field will be either Y or N. If set to Y then the scripts will act on these databases.&lt;BR /&gt;&lt;BR /&gt;In dbabort you will need to change the shutdown bit from&lt;BR /&gt;&lt;BR /&gt;connect internal&lt;BR /&gt;shutdown&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;connect internal&lt;BR /&gt;shutdown abort&lt;BR /&gt;startup&lt;BR /&gt;shutdown&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Try it on a test database to make sure it works ok before putting it into live.&lt;BR /&gt;&lt;BR /&gt;I'm not sure if you would be better off using something like not mounting the database when you restart it to keep the users from getting in after you've just cleaned up after them!&lt;BR /&gt;&lt;BR /&gt;If in doubt check with Oracle support!&lt;BR /&gt;&lt;BR /&gt;Remember that oratab may control whether the database starts at system boot. ie there may be an rc script than checks for this. Also check that no in house written scripts rely on oratab. You don't want to affect them!&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Tue, 23 Apr 2002 13:11:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709007#M947234</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2002-04-23T13:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709008#M947235</link>
      <description>#vi stutdb&lt;BR /&gt;ps -ef|grep ora_reco|grep -v grep|awk '{print $9}'| cut -c 10- &amp;gt;givedb&lt;BR /&gt;for i in `cat givedb`&lt;BR /&gt;do&lt;BR /&gt;ORACLE_SID=$i&lt;BR /&gt;export ORACLE_SID&lt;BR /&gt;svrmgrl &amp;lt;&amp;lt; !&lt;BR /&gt;connect internal;&lt;BR /&gt;shutdown immediate;&lt;BR /&gt;!&lt;BR /&gt;echo "database has been shutdown properly"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;#vi startdb&lt;BR /&gt;for i in 'cat givedb'&lt;BR /&gt;do&lt;BR /&gt;svrmgrl &amp;lt;&amp;lt; !&lt;BR /&gt;connect internal;&lt;BR /&gt;startup force;&lt;BR /&gt;!&lt;BR /&gt;lsnrctl start&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 13:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709008#M947235</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-04-23T13:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709009#M947236</link>
      <description>In response to Dave's last message, just do a startup restrict after the abort to make sure no users log in.</description>
      <pubDate>Wed, 24 Apr 2002 12:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709009#M947236</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-04-24T12:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709010#M947237</link>
      <description>That's the one!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Wed, 24 Apr 2002 12:30:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709010#M947237</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2002-04-24T12:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709011#M947238</link>
      <description>Evella,&lt;BR /&gt;&lt;BR /&gt;How did you get on?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Wed, 24 Apr 2002 12:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709011#M947238</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2002-04-24T12:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709012#M947239</link>
      <description>Hi all.  I use dbshut and dbstart also.  I am curious about the script attached by Alexey.  In the script, you have the following:&lt;BR /&gt;svrmgrl &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;set stoponerror on&lt;BR /&gt;connect internal&lt;BR /&gt;startup&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.STANDARD', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.PLITBLM', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_STANDARD', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_SYS_SQL', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_SQL', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_DESCRIBE', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_OUTPUT', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_UTILITY', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.DBMS_APPLICATION_INFO', 'P');&lt;BR /&gt;--execute sys.dbms_shared_pool.keep('SYS.AUDSES$', 'Q');&lt;BR /&gt;&lt;BR /&gt;exit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;I have never seen these "--execute sys.dbms_???" statements.  Are you overriding oracle shared_pool settings?</description>
      <pubDate>Wed, 24 Apr 2002 18:00:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709012#M947239</guid>
      <dc:creator>Greg OBarr</dc:creator>
      <dc:date>2002-04-24T18:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown script for oracle 8i database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709013#M947240</link>
      <description>I have not used these myslef, but I believe they are new 8i functionality that allow you to "pin" objects into memory.</description>
      <pubDate>Wed, 01 May 2002 19:09:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-script-for-oracle-8i-database/m-p/2709013#M947240</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-05-01T19:09:42Z</dc:date>
    </item>
  </channel>
</rss>

