Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the SID setting?
dean wrote:
> On Mar 15, 10:52 am, DA Morgan <damor..._at_psoug.org> wrote:
>> dean wrote: >>> 10.1g, Windows. >>> Hello all, is there a simple way to get the SID from one of the sys >>> views? >>> And I guess a more general question is: What's a good reference book >>> or web site for these views? >>> Thanks >>> DeanB >> SELECT DISTINCT sid FROM gv$mystat; >> >> SELECT sys_context('USERENV', 'SID') FROM dual; >> >> SELECT sid FROM gv_$session; >> -- >> Daniel A. Morgan >> University of Washington >> damor..._at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org
A DBA will need to grant access to any gv$ or v$ view.
I'd recommend SYS_CONTEXT to any developer. It can also be used to grab lots of other properties. Check out the page in Morgan's Library at www.psoug.org.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Mar 15 2007 - 13:18:49 CDT