Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Solaris/Oracle startup script how-to?
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
export ORACLE_SID echo "Environment variable ORACLE_SID set to DEV6 and exported" SQL*Plus /nolog <<EOF
;; ALL) ORACLE_SID=DNEG export ORACLE_SID echo "Environment variable ORACLE_SID set to DNEG and exported" SQL*Plus /nolog <<EOF
ORACLE_SID=DEV6 export ORACLE_SID echo "Environment variable ORACLE_SID set to DEV6 and exported" SQL*Plus /nolog <<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
export ORACLE_SID echo "Environment variable ORACLE_SID set to DEV6 and exported" SQL*Plus /nolog <<EOF
;; ALL) ORACLE_SID=DNEG export ORACLE_SID echo "Environment variable ORACLE_SID set to DNEG and exported" SQL*Plus /nolog <<EOF
ORACLE_SID=DEV6 export ORACLE_SID echo "Environment variable ORACLE_SID set to DEV6 and exported" SQL*Plus /nolog <<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...
>
>
> Regards,
> Iztok
> >