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: SID enumeration help

Re: SID enumeration help

From: schw <schwartz_at_alpha.net.pl>
Date: 13 Nov 2006 11:17:13 -0800
Message-ID: <1163445433.226832.270830@h48g2000cwc.googlegroups.com>


thanks a lot...what should it look like for windows? :)

Steve Howard napisal(a):
> schw wrote:
> > could you please then provide solutions for unix and winsows
> > seperately?
> >
> > cheers
> > paw
> >
>
> You can use something similar to what is below for *nix...
>
> sids=`cat /etc/oratab | grep -v "#" | grep -v '*' | cut -f1 -d: | sort`
> PS3="Please select an ORACLE environment from the list above: "
> select sid in $sids; do
> export ORACLE_SID="$sid"
> export ORACLE_HOME=`grep "$sid": /etc/oratab | cut -f2 -d:`
> export PATH=$PATH:$ORACLE_HOME/bin
> export PS1=`uname -n`':$LOGNAME:$ORACLE_SID:$PWD>'
> break
> done
>
> You could also invoke oraenv within the loop rather than hardcoding
> your own environment script. I'll leave that as an exercise.
>
> HTH,
>
> Steve
Received on Mon Nov 13 2006 - 13:17:13 CST

Original text of this message

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