Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Posts
    11

    Unanswered: 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?

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    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]

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •