Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    64

    Thumbs down Unanswered: query returning server name

    Hi All ,

    How to return a server name in which Oracle is running .

    In SQL Server we can do that using the query
    select @@servername
    How to get this in Oracle . Is there any straight forward variable to do this .

    Thanks ,
    Sush

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking Host name

    Try:
    Code:
    Select * From V$Instance;

    Or also:
    Code:
     ServerNameIs := SYS_CONTEXT('USERENV','HOST');
    Last edited by LKBrwn_DBA; 09-18-08 at 10:25.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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