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

Home -> Community -> Usenet -> c.d.o.server -> Re: Solaris/Oracle startup script how-to?

Re: Solaris/Oracle startup script how-to?

From: Van Messner <vmessner_at_bestweb.net>
Date: Mon, 21 Aug 2000 21:49:20 GMT
Message-ID: <Atho5.2294$kM2.297434@newshog.newsread.com>

Here's some crude scripts that I keep in my bin directory. I'm sure you can improve them. For example you might want to stop the listener or bounce it once if you are starting all the databases.

Van

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"
          SQL*Plus /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"
          SQL*Plus /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"
          SQL*Plus /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"
          SQL*Plus /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"
          SQL*Plus /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"
          SQL*Plus /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"
          SQL*Plus /nolog <<EOF

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

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

<iztoku_at_my-deja.com> wrote in message news:8nrt89$10d$1_at_nnrp1.deja.com...
> In article <8nrs8f$vqj$1_at_nnrp1.deja.com>,
> lkj741_at_my-deja.com wrote:
> > Connect internal from svrmgrl
> >
> > shutdown immediate or normal
> >
> > Startup open or startup mount then alter database open.
> >
> > start or stop lsnrctl....
> >
> > hope this will help...

>

> I am sorry I wasn't clear. I am looking into shell script examples I
> could run from /etc/init.d on booting/shutting down solaris box.
>

> Regards,
> Iztok
> >

> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Aug 21 2000 - 16:49:20 CDT

Original text of this message

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