Unix Technical Forum

DB2 Database Uptime

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...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 05:06 PM
Jignesh Shah
 
Posts: n/a
Default DB2 Database Uptime

How to check as how long the database is up and running after the db2start?

Jignesh Shah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 05:06 PM
Sean McKeough
 
Posts: n/a
Default Re: DB2 Database Uptime

db2 get snapshot for dbm | grep -i start

Jignesh Shah wrote:
> How to check as how long the database is up and running after the db2start?
>
> Jignesh Shah

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 05:06 PM
Joachim Mueller
 
Posts: n/a
Default Re: DB2 Database Uptime

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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 05:06 PM
Ian
 
Posts: n/a
Default Re: DB2 Database Uptime

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! =-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 05:07 PM
Jignesh Shah
 
Posts: n/a
Default Re: DB2 Database Uptime

Thanx for the answer but i guess database uptime is stored in some
system tables? Any idea in which table?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 05:07 PM
Blair Adamache
 
Posts: n/a
Default Re: DB2 Database Uptime

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?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-26-2008, 05:07 PM
Serge Rielau
 
Posts: n/a
Default Re: DB2 Database Uptime

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-26-2008, 05:08 PM
Amit
 
Posts: n/a
Default Re: DB2 Database Uptime

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com