DB2 Database Uptime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jignesh Shah

    DB2 Database Uptime

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

    Jignesh Shah
  • Sean McKeough

    #2
    Re: DB2 Database Uptime

    db2 get snapshot for dbm | grep -i start

    Jignesh Shah wrote:[color=blue]
    > How to check as how long the database is up and running after the db2start?
    >
    > Jignesh Shah[/color]

    Comment

    • Joachim Mueller

      #3
      Re: DB2 Database Uptime

      Jignesh,

      use :

      db2 get snapshot for dbm |grep Start

      regards,
      Joachim

      "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]


      Comment

      • Ian

        #4
        Re: DB2 Database Uptime

        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! =-----

        Comment

        • Jignesh Shah

          #5
          Re: DB2 Database Uptime

          Thanx for the answer but i guess database uptime is stored in some
          system tables? Any idea in which table?

          Comment

          • Blair Adamache

            #6
            Re: DB2 Database Uptime

            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]

            Comment

            • Serge Rielau

              #7
              Re: DB2 Database Uptime

              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

              Comment

              • Amit

                #8
                Re: DB2 Database Uptime

                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

                Working...