"Jignesh Shah" <jshah@joy.co m> schrieb im Newsbeitrag
news:2360c2cd.0 402120645.5157e e55@posting.goo gle.com...[color=blue]
> How to check as how long the database is up and running after the[/color]
db2start?[color=blue]
>
> Jignesh Shah[/color]
Sean McKeough wrote:
[color=blue]
> db2 get snapshot for dbm | grep -i start
>[/color]
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! =-----
No, information like this is typically not stored in relational tables.
Jignesh Shah wrote:
[color=blue]
> Thanx for the answer but i guess database uptime is stored in some
> system tables? Any idea in which table?[/color]
Blair Adamache wrote:
[color=blue]
> No, information like this is typically not stored in relational tables.
>
> Jignesh Shah wrote:
>[color=green]
>> Thanx for the answer but i guess database uptime is stored in some
>> system tables? Any idea in which table?[/color]
>
>[/color]
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.S NAPSHOT_DATABAS E( '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.e ye-be-em.com> wrote in message news:<c0k2o9$5n r$2@hanover.tor olab.ibm.com>.. .[color=blue]
> Blair Adamache wrote:
>[color=green]
> > No, information like this is typically not stored in relational tables.
> >
> > Jignesh Shah wrote:
> >[color=darkred]
> >> Thanx for the answer but i guess database uptime is stored in some
> >> system tables? Any idea in which table?[/color]
> >
> >[/color]
> 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[/color]
Comment