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 > How to find if the database is explicitly activated or not?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-11, 11:38
VenkatG VenkatG is offline
Registered User
 
Join Date: Mar 2011
Posts: 11
How to find if the database is explicitly activated or not?

As we know , the database can be activated explicitly using $db2 activate db [db_name]

The database can activated implicitly, when we make first connection to the database.

My Question:
How to find if the database is explicitly activated or not?
Reply With Quote
  #2 (permalink)  
Old 03-03-11, 21:56
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
If the db is listed in the list active databases output with zero applications connected, then activate db command was used.

Or check db2diag.log for the following entry:

START : DATABASE: <db name> : ACTIVATED: [YES/NO]
Reply With Quote
  #3 (permalink)  
Old 03-04-11, 10:34
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by BELLO4KA View Post
If the db is listed in the list active databases output with zero applications connected, then activate db command was used.

Or check db2diag.log for the following entry:

START : DATABASE: <db name> : ACTIVATED: [YES/NO]
If users are connected, the the first method is useless.

If, like a good DBA should, the db2diag.log gets archived daily and the system has been up for days or months, the second method would get complicated real fast.

Obviously DB2 knows if a database was explicitly activated as it has to be explicitly deactivated. You would think that you could get this simple bit of information, but I cannot find how.

Andy
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