By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,823 Members | 730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,823 IT Pros & Developers. It's quick & easy.

how to find the db2 udb instance has stopped/started

P: n/a
Hi,

Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.

Thanks in advance.

Jan 1 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a

pr********@gmail.com wrote:
Hi,

Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.

Thanks in advance.

Hai Prince ...
As this is relating to the instance i guess there wont be any table
from where we can get the timestamp.B'cos to access a table we need a
database connection and the table will be specific to that database. As
Table is an object which is specific to a database i guess we cannot
get the information for the instance as a whole....
So the only option left is the db2diag.log.

But ..
If there is any error when starting or stopping the instance a log is
created in the following locations with the timestamp.

Windows : C:\Program Files\IBM\SQLLIB\DB2\log
Linux or UNIX : <instance home dir >/sqllib/log

Format of the file is : db2start.<timestamp when it happened>.errlog
db2stop.<timestamp when it
happened>.errlog

This is my view please let me know if we have any other way to find
.....

Thanks

Kamal.....

Jan 2 '07 #2

P: n/a

pr********@gmail.com wrote:
Hi,

Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.

Thanks in advance.

Hai Prince ...

As this is relating to the instance i guess there wont be any table
from where we can get the timestamp.B'cos to access a table we need a
database connection and the table will be specific to that database. As

Table is an object which is specific to a database i guess we cannot
get the information for the instance as a whole....

I guess this is the same with Stored procedures also...

So there are two options we have now

1. Command to find the timestamp when an instance is started/stopped
..---- not sure about this ---according to my knowledge we dont have any
such command

2. As u said db2diag.log.....
But ..
If there is any error when starting or stopping the instance a log is
created in the following locations with the timestamp.
Windows : C:\Program Files\IBM\SQLLIB\DB2\log
Linux or UNIX : <instance home dir >/sqllib/log
Format of the file is : db2start.<timestamp when it happened>.errlog
db2stop.<timestamp when it
happened>.errlog
This is my view please let me know if we have any other way to find
.....
Thanks
Kamal.....

Jan 2 '07 #3

P: n/a
Udo
>
Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.

"db2 get snapshot for dbm"

will show you the "Start Database Manager timestamp". There's also an
equivalent udf available.
Regards,
Udo

--
Speedgain for DB2 - The DB2 Monitor
http://www.itgain.de/en/index.html

Jan 2 '07 #4

P: n/a

Udo wrote:

Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.


"db2 get snapshot for dbm"

will show you the "Start Database Manager timestamp". There's also an
equivalent udf available.
Regards,
Udo

--
Speedgain for DB2 - The DB2 Monitor
http://www.itgain.de/en/index.html
Yes this is giving the timestamp.. Thanks Udo for the information....

db2 get snapshot for dbm

Database Manager Snapshot

Node type = Enterprise Server
Edition with local and remote clients
Instance name = db2inst1
Number of database partitions in DB2 instance = 1
Database manager status = Active

Product name = DB2 v8.1.0.64
Service level = s040812 (MI00086)

Private Sort heap allocated = 0
Private Sort heap high water mark = 0
Post threshold sorts = Not Collected
Piped sorts requested = 0
Piped sorts accepted = 0

Start Database Manager timestamp = 01/02/2007
11:59:00.453926
----------------------------------------------------------------------------------------------------------------
Last reset timestamp =
Snapshot timestamp = 01/02/2007
11:59:06.548066

Jan 2 '07 #5

P: n/a

Udo wrote:

Whether is there any way to find stopped/started timestamp of a db2 udb
instance other than the db2diag.log files.Is there any catalog table
available to get the timestamp informations or by using stored
procedures we can get the information's.


"db2 get snapshot for dbm"

will show you the "Start Database Manager timestamp". There's also an
equivalent udf available.
Regards,
Udo

--
Speedgain for DB2 - The DB2 Monitor
http://www.itgain.de/en/index.html
Yes this is Giving the timestamp.. Thanks for the info Udo.... Could u
please let us know about the UDF also...

db2 get snapshot for dbm

Database Manager Snapshot

Node type = Enterprise Server
Edition with local and remote clients
Instance name = db2inst1
Number of database partitions in DB2 instance = 1
Database manager status = Active

Product name = DB2 v8.1.0.64
Service level = s040812 (MI00086)

Private Sort heap allocated = 0
Private Sort heap high water mark = 0
Post threshold sorts = Not Collected
Piped sorts requested = 0
Piped sorts accepted = 0

Start Database Manager timestamp = 01/02/2007
11:59:00.453926
Last reset timestamp =
Snapshot timestamp = 01/02/2007
11:59:06.548066
Thanks
Kamal.....

Jan 2 '07 #6

P: n/a
Udo
Yes this is Giving the timestamp.. Thanks for the info Udo.... Could u
please let us know about the UDF also...
db2 "select DB2START_TIME from table(snapshot_dbm(0)) as dbm"

Regards,
Udo

--
Speedgain for DB2 - The DB2 Monitor
http://www.itgain.de/en/index.html

Jan 2 '07 #7

P: n/a

Udo wrote:
Yes this is Giving the timestamp.. Thanks for the info Udo.... Could u
please let us know about the UDF also...

db2 "select DB2START_TIME from table(snapshot_dbm(0)) as dbm"

Regards,
Udo

--
Speedgain for DB2 - The DB2 Monitor
http://www.itgain.de/en/index.html\


Thanks Udo......

Can u explain the statement " table(snapshot_dbm(0)) as dbm " . This
is a select statement on which table ? .....
Is there any catalog table from which it is getting the information ?
if so the assumptions i gave in the first mail is wrong..
Thanks in advance ....
Kamal....

can u pls clear me on this......

Jan 2 '07 #8

P: n/a
Gladiator wrote:
Can u explain the statement " table(snapshot_dbm(0)) as dbm " . This
is a select statement on which table ? .....
From a table function.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jan 2 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.