Check database user login history

Just making a quick post 🙂

I know this one will come handy in there future. I hope you find it useful too.

When you want to check login history from your database user, prior to oracle 10g (which is 9i and below) you only have two option:

  1. Setup trigger that record whenever user login or logoff
  2. Set your auditing session (aud$) and query it directly from the result

However they both require a lil bit knowledge. On the newer version of the database all you need is the query below

select * from dba_hist_active_sess_history

It will give you the same result you expect. You need to correlate the data with the user_id to see whose doing what. You can see user_id from the dba_users table 🙂

Hope you find it useful!

The lost one~

About coconoar

Prefer to be called Nathan or Nael. Not your average IT guy. Talkative and listen a lot, quite stubborn but understanding. At the moment working with Oracle 9i, 10g, and 11g Focusing on performance Tuning and SQL Tuning Not your best DBA, but hopefully on the right track Since i'm unsure that's why i call my Oracle Blog The Lost DBA, dedicated to all those people that looking for reliable source, easy technical reading, and of course a lost person/
This entry was posted in Database, Uncategorized and tagged , , , . Bookmark the permalink.

Leave a comment