DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Hostname using SQL statement

  1. #1
    Join Date
    Oct 2004
    Posts
    9

    Hostname using SQL statement

    Hi,
    Is there a way to identify the hostname of the database using a SQL statement, if yes will be glad if you could share the same with me.

    Thanks in advance

  2. #2
    Join Date
    Jan 2003
    Location
    Hull, UK
    Posts
    220
    select sys_context('userenv','host') from dual;

    Returns : Name of the host machine from which the client has
    connected.

    is tht what u want...

    if u want to know the hostname where the db is running....then

    it will be select host_name from v$instance;

    Srini

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