If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > last access to database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-10, 06:28
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
last access to database

Hi,
I am working on DB2 v9.1 on AIX.
Is there a way to find last access time to a particular database. Audit is not enabled. Is there some other way?
Reply With Quote
  #2 (permalink)  
Old 08-11-10, 22:10
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
The best I can think of is to check the date/time of when the transaction logs were last modified.
Reply With Quote
  #3 (permalink)  
Old 08-12-10, 07:40
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Quote:
Originally Posted by db2girl View Post
The best I can think of is to check the date/time of when the transaction logs were last modified.
I don't think, that this very accurate. If there are still runstats or backup jobs, then you get the dates from these jobs, but not the last user access.
Reply With Quote
  #4 (permalink)  
Old 08-12-10, 08:06
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
Bella thanks for your reply but nvk@vhv is right. That will not give me the expected answer as backup jobs are getting executed on a daily basis.
Reply With Quote
  #5 (permalink)  
Old 08-12-10, 10:10
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Yes, it's not very accurate. But I'm not sure what else you can check without capturing any information. Starting with v9.7 fp1, lastused column was added to some catalog tables.
Reply With Quote
  #6 (permalink)  
Old 03-16-11, 17:01
sacha79 sacha79 is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
SImple solution to know if dtabase is used

Quote:
Originally Posted by BELLO4KA View Post
The best I can think of is to check the date/time of when the transaction logs were last modified.
A very simple solution to know if a database is ued :

SQL Server : Activité sur une base de données
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On