How to get SID from dual
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: How to get SID from dual

  1. #1
    Join Date
    Feb 2003
    Posts
    67

    How to get SID from dual

    How to get SID from dual if user does not have SELECT_CATALOG_ROLE.
    He can not see v$ tables.

  2. #2
    Join Date
    Jan 2001
    Posts
    642
    select * from global_name;

    This should work.

    Badirnath
    There is always a better way to do the things.

  3. #3
    Join Date
    Feb 2003
    Posts
    67
    Badri... Thanks...

    Global is often manually updated and it could be pointing to a wrong value if the database is cloned from another database.

    If there a USERENV or SYS_CONTEXT command we can do to get SID from dual?

  4. #4
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Code:
             SELECT SYS_CONTEXT('USERENV','DB_NAME') FROM dual;
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  5. #5
    Join Date
    Feb 2003
    Posts
    67
    Thanks Sam.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width