Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: HP-UX startup & shutdown scripts for 8.0.6

Re: HP-UX startup & shutdown scripts for 8.0.6

From: Van Messner <vmessner_at_bestweb.net>
Date: 2000/04/08
Message-ID: <t7PH4.395$%L6.29070@monger.newsread.com>#1/1

Here's a pair for Solaris. You'll have to change the environment variables and SIDs to suit yourself. Your sysadmin will advise on how to run them automatically or at a set time. (These are written so a UNIX moron like me can understand them. You can probably put the repetitive code into a loop.)

Van

Shell Scripts
ORALOAD
$ cat oraload
echo "Type the SID for the database you want to start up" echo "Your choices are DNEG, DEV6 . Or type ALL to start up all the instances."
read dbsid
PATH=/usr/bin:/usr/ucb:/etc:/oracle/app/oracle/product/8.1.5/bin:/usr/ccs/bi n:.
export PATH
echo "Environment variable PATH set and exported" case $dbsid
in

    DNEG) ORACLE_SID=$dbsid

          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DNEG and exported"
          sqlplus /nolog <<EOF

connect internal
startup open pfile='/oracle/app/oracle/admin/DNEG/pfile/initDNEG.ora'; disconnect
EOF
          ;;
    DEV6) ORACLE_SID=$dbsid
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DEV6 and exported"
          sqlplus /nolog <<EOF

connect internal
startup open pfile='/oracle/app/oracle/admin/DEV6/pfile/initDEV6.ora'; disconnect
EOF
          ;;
     ALL) ORACLE_SID=DNEG
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DNEG and exported"
          sqlplus /nolog <<EOF

connect internal
startup open pfile='/oracle/app/oracle/admin/DNEG/pfile/initDNEG.ora'; disconnect
EOF
          ORACLE_SID=DEV6
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DEV6 and exported"
          sqlplus /nolog <<EOF

connect internal
startup open pfile='/oracle/app/oracle/admin/DEV6/pfile/initDEV6.ora'; disconnect
EOF
          ;;
       *) echo "You entered no SID or an invalid SID - program stopped" ;;
esac

ORAUNLD
vi oraunld
"oraunld" 79 lines, 2163 characters
echo "Type the SID for the database you want to shut down" echo "Your choices are DNEG GSP2 GSPD ORCL. Or type ALL to shut down all the instances."
read dbsid
PATH=/usr/bin:/usr/ucb:/etc:/oracle/app/oracle/product/8.1.5/bin:/usr/ccs/bi n:.
export PATH
echo "Environment variable PATH set and exported" case $dbsid
in

    DNEG) ORACLE_SID=$dbsid

          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DNEG and exported"
          sqlplus /nolog <<EOF

connect internal
shutdown immediate;
disconnect
EOF
          ;;
    DEV6) ORACLE_SID=$dbsid
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DEV6 and exported"
          sqlplus /nolog <<EOF

connect internal
shutdown immediate;
disconnect
EOF
          ;;
     ALL) ORACLE_SID=DNEG
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DNEG and exported"
          sqlplus /nolog <<EOF

connect internal
shutdown immediate;
disconnect
EOF
          ORACLE_SID=DEV6
          export ORACLE_SID
          echo "Environment variable ORACLE_SID set to DEV6 and exported"
          sqlplus /nolog <<EOF

connect internal
shutdown immediate;
disconnect
EOF
          ;;
       *) echo "You entered no SID or an invalid SID - program stopped" ;;
esac

Brendan Newport <brendan_at_cathouse.nwnet.co.uk> wrote in message news:38ef69b4.0_at_news2.cluster1.telinco.net...
> Before I re-invent the wheel, and write some scripts that have already
 been
> long done...
>
> Has anyone any minimum automatic start-up and shutdown scripts for HP-UX
> 11.0? The technet article I read
> http://technet.oracle.com/support/bboard/content/1050.htm seems to have
 been
> authored by someone on drugs.
>
> I don't have access to the HP-UX Installation CD.
>
> Thanx
>
>
> Brendan
>
>
Received on Sat Apr 08 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US