Home » SQL & PL/SQL » SQL & PL/SQL » how do i display which host i am connected to in sql
how do i display which host i am connected to in sql [message #560] Wed, 20 February 2002 09:07 Go to next message
laz
Messages: 1
Registered: February 2002
Junior Member
is there a way to SHOW what host/database i am connected to in SQL? I know very little about sql.

thanks for any help,
laz
Re: how do i display which host i am connected to in sql [message #562 is a reply to message #560] Wed, 20 February 2002 09:19 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
this query returns DB server machine name:

SELECT HOST_NAME FROM V$INSTANCE;

to get database name:

1)SELECT name from v$database
or

2)
SQL> show parameter db_name
or

3) select value from v$parameter where name='db_name'
Previous Topic: DOING A SELECT ON A PL/SQL TABLE
Next Topic: insert sysdate with specific time
Goto Forum:
  


Current Time: Sun Sep 19 06:40:05 CDT 2021