Home » RDBMS Server » Server Administration » Session history
Session history [message #288501] Mon, 17 December 2007 17:07 Go to next message
uicmxz
Messages: 48
Registered: July 2006
Member
How to dig information regarding Oracle session in the past? When session was created in a time in the past, user ID, program or module? Is there any particular table or view that stores all oracle history session information?
Re: Session history [message #288502 is a reply to message #288501] Mon, 17 December 2007 17:11 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
V$SESSION contains such information for current sessions.
For previously terminated sessions, information is only available if AUDIT had been enabled at the time the session started.
Re: Session history [message #288522 is a reply to message #288501] Mon, 17 December 2007 22:30 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

SQL> desc v$sesstat;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 SID                                                NUMBER
 STATISTIC#                                         NUMBER
 VALUE                                              NUMBER

SQL> desc V$statname;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 STATISTIC#                                         NUMBER
 NAME                                               VARCHAR2(64)
 CLASS                                              NUMBER
 STAT_ID                                            NUMBER


for user session statistics v$sesstat and for name v$statname.
Re: Session history [message #288570 is a reply to message #288501] Tue, 18 December 2007 01:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> desc DBA_HIST_ACTIVE_SESS_HISTORY
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 SNAP_ID                                   NUMBER
 DBID                                      NUMBER
 INSTANCE_NUMBER                           NUMBER
 SAMPLE_ID                                 NUMBER
 SAMPLE_TIME                               TIMESTAMP(3)
 SESSION_ID                                NUMBER
 SESSION_SERIAL#                           NUMBER
 USER_ID                                   NUMBER
...
 PROGRAM                                   VARCHAR2(64)
 MODULE                                    VARCHAR2(48)
 ACTION                                    VARCHAR2(32)
 CLIENT_ID                                 VARCHAR2(64)

Regards
Michel
Re: Session history [message #288668 is a reply to message #288570] Tue, 18 December 2007 04:52 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Be careful with DBA_HIST_ACTIVE_SESS_HISTORY, if you don't have a license for the Diagnostic Pack then legally you can't query this view.
Previous Topic: to change .dbf file to another location
Next Topic: Processor license query
Goto Forum:
  


Current Time: Thu Sep 19 14:10:53 CDT 2024