Display username and database
rem Name: cinfo.sql
rem Purpose: Display username and database
rem Usage: @cinfo <%user%>
rem Subject: session
rem Attrib: sql
rem SeeAlso: @who
@setup
define usr="upper('&&1')"
column uname format a15
column status format a1 heading "S"
column module format a15 wrap
column action format a15 wrap
column client_info format a28 wrap
select
s.username||','||s.sid uname
, substr(s.status, 1, 1) status
, s.module
, s.action
, s.client_info
from v$session s
where s.type = 'USER'
and s.username is not null
and s.username like &&usr
order by username
;
undef usr
@setdefs
Have a Oracle Question
Do
you have an Oracle Question?
Oracle Books
Oracle
Certification, Database Administration, SQL, Application, Programming Reference
Books
Oracle Application
Oracle
Application Hints and Tips
Oracle Home
Oracle
Database, SQL, Application, Programming Tips
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies.
The site www.erpgreat.com is not affiliated with or endorsed
by any company listed at this site.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.erpgreat.com or the content authors.
|