Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: selecting name of instance
"Ana C. Dent" <anacedent_at_hotmail.com> wrote in message
news:8pQFa.80181$MJ5.26322_at_fed1read03...
> Harald Maier wrote:
> > "Christoph Seidel" <christoph.seidel1_at_gmx.de> writes:
> >
> >
> >>how can i select the name of the instance i'm connected to?
> >>
> >>e.g. something like "select SID from dual;" or so.
> >
> >
> > I like
> >
> > select global_name from global_name;
>
> FWIW - not that I'd recommend this, but it is NOT
> a requirement that GLOBAL_NAME = SID (or anything close to it.)
>
> On the instance of your choice, do
> UPDATE GLOBAL_NAME SET GLOBAL_NAME = 'FUBAR';
> COMMIT;
>
> Now "select global_name from global_name;"
> and ask yourself if the results match the SID.
I agree completely with Ana.
If you want the instance name: select instance_name from v$instance
Regards,
Paul
Received on Thu Jun 12 2003 - 17:28:54 CDT