sqlplus how to find details of the currently connected database session

Nishant Bhardwaj picture Nishant Bhardwaj · Mar 21, 2013 · Viewed 133.9k times · Source

I have very recently started to work on oracle databases. Generally I have many sqlplus windows open to different oracle databases. When switching from one sqlplus session to another, how can i view the current session details for each sqlplus session ? Any help is greatly appreciated!

Answer

igr picture igr · Mar 21, 2013
show user

to get connected user

 select instance_name from v$instance

to get instance or set in sqlplus

set sqlprompt "_USER'@'_CONNECT_IDENTIFIER> "