Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlplus how to find details of the currently connected database session

Tags:

oracle

sqlplus

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!

like image 650
Nishant Bhardwaj Avatar asked Mar 21 '13 07:03

Nishant Bhardwaj


2 Answers

show user

to get connected user

 select instance_name from v$instance

to get instance or set in sqlplus

set sqlprompt "_USER'@'_CONNECT_IDENTIFIER> "
like image 152
igr Avatar answered Oct 22 '22 21:10

igr


I know this is an old question but I did try all the above answers but didnt work in my case. What ultimately helped me out is

SHOW PARAMETER instance_name

like image 41
rajesh Avatar answered Oct 22 '22 22:10

rajesh