Find Active Sessions in Oracle Database
June 8, 2008
There are times that you may need to issue a “SHUTDOWN IMMEDIATE” command to an Oracle Database. It is critical that you should consider checking who are the users that are currently running sessions on that Database. You don’t want to shutdown on your Boss or VP on Finance. Here’s a simple SQL to find all Active sessions in your Oracle Database:
Department to Prevent Redundancy Department…
Isn’t it a bit silly to include STATUS in your query results when you’ve specified ‘ACTIVE’ as a criteria ??
Sheesh!
– Jim
Interestingly this does not show oledb/odbc connections!
This functionality is readily available as a menu item in PL/SQL Developer (Tools->Sessions…).
Cool….Thanks
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
If you have a RAC configuration, you can use the next SQL to show the same information plus the instance identification on which the session is connected to:
SELECT Inst_Id, SID, Serial#, UserName, Status, SchemaName, Logon_Time
FROM GV_$Session
WHERE Status=’ACTIVE’ AND
UserName IS NOT NULL;