<?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 scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578136#M854243</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What you need to know is normally illustrated in the Oracle Installation Guide. There is a script that Oracle have written called dbstart dbshut. You will need to create and modify a script which should be located in your /sbin/init.d called dbora, to call these scripts. This helps when you shutdown the Unix box. It cleanly shutdowns the databases you have running.&lt;BR /&gt;&lt;BR /&gt;There are also a couple of other scripts that you can use to intergrate with these to copy the control files and redo logs onto script.&lt;BR /&gt;&lt;BR /&gt;I don't know if this is what you are actually looking for. but i hope i have pointed you in the right direction.&lt;BR /&gt;&lt;BR /&gt;My dbora script looks like this.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# Set ORA_HOME to be equivalent to the ORACLE_HOME from which&lt;BR /&gt;# you wish to execute dbstart and dbshut&lt;BR /&gt;#&lt;BR /&gt;# Set ORA_OWNER to the user id of the owner of the Oracle &lt;BR /&gt;# database in the ORA_HOME&lt;BR /&gt;ORA_HOME=/u01/app/oracle/product/8.1.7&lt;BR /&gt;ORA_OWNER=oracle&lt;BR /&gt;if [ ! -f $ORA_HOME/bin/dbstart ]&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')&lt;BR /&gt;&lt;BR /&gt;# Start the Oracle databases:&lt;BR /&gt;&lt;BR /&gt;# The following command assumes that the oracle login will not&lt;BR /&gt;# prompt the user for any values&lt;BR /&gt;&lt;BR /&gt;echo "Oracle Startup in progress"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" &lt;BR /&gt;;;&lt;BR /&gt;&lt;BR /&gt;'stop')&lt;BR /&gt;&lt;BR /&gt;# Stop the Oracle databases:&lt;BR /&gt;# The following command assumes that the oracle login will not&lt;BR /&gt;# prompt the user for any values&lt;BR /&gt;&lt;BR /&gt;echo "Oracle Shutdown in progress"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" &lt;BR /&gt;;;&lt;BR /&gt;esac</description>
    <pubDate>Wed, 12 Sep 2001 02:17:19 GMT</pubDate>
    <dc:creator>maria paschali</dc:creator>
    <dc:date>2001-09-12T02:17:19Z</dc:date>
    <item>
      <title>startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578135#M854242</link>
      <description>I have 11.0 and Oracle8i running on it. I need a script that would stop the database and copy redologs and control files to a disk area , then start the database and listener too. &lt;BR /&gt;Please assist me..</description>
      <pubDate>Wed, 12 Sep 2001 00:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578135#M854242</guid>
      <dc:creator>Nago</dc:creator>
      <dc:date>2001-09-12T00:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578136#M854243</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What you need to know is normally illustrated in the Oracle Installation Guide. There is a script that Oracle have written called dbstart dbshut. You will need to create and modify a script which should be located in your /sbin/init.d called dbora, to call these scripts. This helps when you shutdown the Unix box. It cleanly shutdowns the databases you have running.&lt;BR /&gt;&lt;BR /&gt;There are also a couple of other scripts that you can use to intergrate with these to copy the control files and redo logs onto script.&lt;BR /&gt;&lt;BR /&gt;I don't know if this is what you are actually looking for. but i hope i have pointed you in the right direction.&lt;BR /&gt;&lt;BR /&gt;My dbora script looks like this.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# Set ORA_HOME to be equivalent to the ORACLE_HOME from which&lt;BR /&gt;# you wish to execute dbstart and dbshut&lt;BR /&gt;#&lt;BR /&gt;# Set ORA_OWNER to the user id of the owner of the Oracle &lt;BR /&gt;# database in the ORA_HOME&lt;BR /&gt;ORA_HOME=/u01/app/oracle/product/8.1.7&lt;BR /&gt;ORA_OWNER=oracle&lt;BR /&gt;if [ ! -f $ORA_HOME/bin/dbstart ]&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')&lt;BR /&gt;&lt;BR /&gt;# Start the Oracle databases:&lt;BR /&gt;&lt;BR /&gt;# The following command assumes that the oracle login will not&lt;BR /&gt;# prompt the user for any values&lt;BR /&gt;&lt;BR /&gt;echo "Oracle Startup in progress"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" &lt;BR /&gt;;;&lt;BR /&gt;&lt;BR /&gt;'stop')&lt;BR /&gt;&lt;BR /&gt;# Stop the Oracle databases:&lt;BR /&gt;# The following command assumes that the oracle login will not&lt;BR /&gt;# prompt the user for any values&lt;BR /&gt;&lt;BR /&gt;echo "Oracle Shutdown in progress"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"&lt;BR /&gt;/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" &lt;BR /&gt;;;&lt;BR /&gt;esac</description>
      <pubDate>Wed, 12 Sep 2001 02:17:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578136#M854243</guid>
      <dc:creator>maria paschali</dc:creator>
      <dc:date>2001-09-12T02:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578137#M854244</link>
      <description>Nago,&lt;BR /&gt;&lt;BR /&gt;Get the startup and shutdown scripts from your DBA. You can use any file in /sbin/init.d/ as a template. Copy it to the name that you want. Basically this script takes one argument. There would be four types of the argument. start_msg, stop_msg, start, stop. There are case statements that call different routines based on the argument passed. It is very self-explanatory if you look at any of the scripts in /sbin/init.d Once this is done, create links from either /sbin/rc3.d or /sbin/rc4.d depending on the default run level you have in your /etc/inittab. (mostly rc3.d).&lt;BR /&gt;&lt;BR /&gt;For ex., you call your scripts as oracle,oracle_lsnr first test them &lt;BR /&gt;&lt;BR /&gt;#/sbin/init.d/oracle start&lt;BR /&gt;#/sbin/init.d/oracle stop&lt;BR /&gt;#/sbin/init.d/oracle_lsnr start&lt;BR /&gt;#/sbin/init.d/oracle_lsnr stop&lt;BR /&gt;&lt;BR /&gt;Once these scripts are working, now create links&lt;BR /&gt;&lt;BR /&gt;#ln -s /sbin/init.d/oracle /sbin/rc3.d/S925oracle&lt;BR /&gt;#ln -s /sbin/init.d/oracle /sbin/rc3.d/K925oracle&lt;BR /&gt;#ln -s /sbin/init.d/oracle_lsnr /sbin/rc3.d/S926oracle_lsnr&lt;BR /&gt;#ln -s /sbin/init.d/oracle_lsnr /sbin/rc3.d/K926oracle_lsnr&lt;BR /&gt;&lt;BR /&gt;The above number decide when the scripts are to be run in that run level. &lt;BR /&gt;&lt;BR /&gt;You can also control these scripts by calling the "flag scripts" from /etc/rc.config.d directory. Here you can set a flag like ORACLE=0 or 1 and you can verify this flag in your /sbin/init.d/ script.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 12 Sep 2001 02:50:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578137#M854244</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-12T02:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578138#M854245</link>
      <description>Hello Nago,&lt;BR /&gt;&lt;BR /&gt;the only way to be certain you copy the "real" files, is&lt;BR /&gt;to ask the Oracle instance before shutting it down:&lt;BR /&gt;&lt;BR /&gt;su - oracle&lt;BR /&gt;svrmgrl&lt;BR /&gt;connect internal&lt;BR /&gt;startup exclusive&lt;BR /&gt;spool files.lst&lt;BR /&gt;select name from v$controlfile;&lt;BR /&gt;select member from v$logfile;&lt;BR /&gt;select name from v$datafile;&lt;BR /&gt;spool off&lt;BR /&gt;shutdown immediate&lt;BR /&gt;exit&lt;BR /&gt;echo $ORACLE_HOME/dbs/init$ORACLE_SID.ora &amp;gt; list&lt;BR /&gt;grep '/' files.lst | tr -d ' ' &amp;gt;&amp;gt; list&lt;BR /&gt;cp $(cat list) /backup &lt;BR /&gt;dbstart&lt;BR /&gt;&lt;BR /&gt;This will make a full offline backup of you instance.&lt;BR /&gt;But really, it needs more to set up a proper procedure&lt;BR /&gt;to backup and restore a productive Oracle DB server!&lt;BR /&gt;Be careful. Kevin Loneys book "DBA Handbook" might&lt;BR /&gt;be a good starting point for you.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Wed, 12 Sep 2001 12:00:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578138#M854245</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-09-12T12:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578139#M854246</link>
      <description>Hi Nago,&lt;BR /&gt;&lt;BR /&gt;The dbshut and dbstart files can be modified in ORACLE_HOME/bin for your instances and yur start/stop script placed in /sbin/init.d folder. For the script callup program in /etc/rc.config.d. With the startup link in /sbin/rc3.d (S###orac???) and stop link file in sbin/rc1.d (K###orac???)with the proper sequence numbers. Always check the etc/rc.log file for any errors. See attached file</description>
      <pubDate>Tue, 09 Oct 2001 13:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578139#M854246</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2001-10-09T13:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578140#M854247</link>
      <description>Hello Nago,&lt;BR /&gt;&lt;BR /&gt;This script is for daily Flexcube/Oracle control file and Redo log backups. Pls see the attached file. It shuts down the databases, creates a folder with the day's date. The program also copies your files to a created directory for the day and sends mail to the DBA's</description>
      <pubDate>Tue, 09 Oct 2001 14:03:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578140#M854247</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2001-10-09T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578141#M854248</link>
      <description>Hello NAGO!&lt;BR /&gt;&lt;BR /&gt;You can now award your scores so that we know how we have helped you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 09 Oct 2001 14:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578141#M854248</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2001-10-09T14:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578142#M854249</link>
      <description>Hello, all you helpful "reply" writers,&lt;BR /&gt;&lt;BR /&gt;since s/he does not respond, I guess s/he is&lt;BR /&gt;not really interested :-(&lt;BR /&gt;&lt;BR /&gt;BUT, this is a pretty good candidate for a FAQ,&lt;BR /&gt;is it not?&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Wodisch</description>
      <pubDate>Tue, 09 Oct 2001 15:30:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578142#M854249</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-10-09T15:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578143#M854250</link>
      <description>Hai Nago,&lt;BR /&gt;&lt;BR /&gt;Dont forget to assign the points who helped you....&lt;BR /&gt;&lt;BR /&gt;Rajkumar</description>
      <pubDate>Tue, 16 Oct 2001 11:34:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578143#M854250</guid>
      <dc:creator>Rajkumar_3</dc:creator>
      <dc:date>2001-10-16T11:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: startup/shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578144#M854251</link>
      <description>Rajkumar,&lt;BR /&gt;&lt;BR /&gt;Noble Advice indeed.&lt;BR /&gt;&lt;BR /&gt;From your profile:&lt;BR /&gt;This member has assigned points to 45 of 98 responses to his/her questions.&lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Nov 2001 14:35:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-shutdown-scripts/m-p/2578144#M854251</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-11-12T14:35:59Z</dc:date>
    </item>
  </channel>
</rss>

