| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: SID enumeration help
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
![]() |
![]() |