473,395 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DB2 Database Uptime

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

Jignesh Shah
Nov 12 '05 #1
7 9205
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

Nov 12 '05 #2
Jignesh,

use :

db2 get snapshot for dbm |grep Start

regards,
Joachim

"Jignesh Shah" <js***@joy.com> schrieb im Newsbeitrag
news:23**************************@posting.google.c om...
How to check as how long the database is up and running after the db2start?
Jignesh Shah

Nov 12 '05 #3
Ian
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! =-----
Nov 12 '05 #4
Thanx for the answer but i guess database uptime is stored in some
system tables? Any idea in which table?
Nov 12 '05 #5
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?


Nov 12 '05 #6
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
Nov 12 '05 #7
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 <sr*****@ca.eye-be-em.com> wrote in message news:<c0**********@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

Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Oli Schwarz | last post by:
Hello, how can I read out the uptime of a unix system in python (Linux and *BSD). I have not found a uptime-function in the Library. Regards Oli
24
by: Esmail Bonakdarian | last post by:
Hi, Is there a way to display how long a Win XP system has been up? Somewhat analogous to the *nix uptime command. Thanks, Esmail
346
by: rkusenet | last post by:
http://biz.yahoo.com/rc/040526/tech_database_marketshare_1.html Interesting to see that database sales for windows is more than Unix.
6
by: MA | last post by:
Hi all! I know there is other newsgroups for webservices, but I donīt get any answers on those. I have developed a webservice that writeing and reading files in different folders. Question...
4
by: Dylan Parry | last post by:
Hi, I'm looking for a way to calculate the amount of time that Windows has been running since the last boot. Ideally I'd like to be able to create a DateTime object containing this value so that...
0
by: streamkid | last post by:
hello.. could anyone please help me build a uptime script for openbsd? i tried phpsysinfo, it doesn't work (only uptime works, and that's around 15k days :p) i tried these: <?php...
8
by: Guy Macon | last post by:
How to increase web server uptime with DNS failover: For illustration, let's start with some really bad hosting... Find four free web hosts that are each 90% reliable -- in other words they...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.