This is a discussion on DB2 Database Uptime within the DB2 forums, part of the Database Server Software category; --> How to check as how long the database is up and running after the db2start? Jignesh Shah...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Jignesh, use : db2 get snapshot for dbm |grep Start regards, Joachim "Jignesh Shah" <jshah@joy.com> schrieb im Newsbeitrag news:2360c2cd.0402120645.5157ee55@posting.google.c om... > How to check as how long the database is up and running after the db2start? > > Jignesh Shah |
| |||
| Sean McKeough wrote: > db2 get snapshot for dbm | grep -i start > This tells you the instance start time. If you're interested in a particular database (i.e. when it was activated): db2 get snapshot for db on <dbname> | grep -i first The field name, "First database connect timestamp" is somewhat misleading, because it is actually the database activation timestamp (i.e. there may not be any connections to the database). Good luck, -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- |
| |||
| Blair Adamache wrote: > No, information like this is typically not stored in relational tables. > > Jignesh Shah wrote: > >> Thanx for the answer but i guess database uptime is stored in some >> system tables? Any idea in which table? > > Actually I wonder whether that can be retrieved from a snapshot table-function. Check out the table-function section in the SQL Reference. Cheers Serge -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab |
| ||||
| you can use the following query select A.DB_CONN_TIME from TABLE(SYSPROC.SNAPSHOT_DATABASE( 'SAMPLE', -1)) AS A; but only use it locally on the database (i.e. the database directory type entry shows local or indirect in list db directory) - it may fail when invoked from a client. Serge Rielau <srielau@ca.eye-be-em.com> wrote in message news:<c0k2o9$5nr$2@hanover.torolab.ibm.com>... > Blair Adamache wrote: > > > No, information like this is typically not stored in relational tables. > > > > Jignesh Shah wrote: > > > >> Thanx for the answer but i guess database uptime is stored in some > >> system tables? Any idea in which table? > > > > > Actually I wonder whether that can be retrieved from a snapshot > table-function. Check out the table-function section in the SQL Reference. > > Cheers > Serge |