querying backup process

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tambi Dude

    querying backup process

    I am new to DB2. The version we are using is 8.2.3

    I have to query DB2 to find out all backups for a given database and take
    following
    information

    Backup Date, Start Time, End TIme, Status
    If failure, the error code.

    I am working on a script of someone else.

    The command used is db2 list history backup since YYMMDD for DBNAME.

    And then I have to filter out the information from the output.

    Is there a better way. Like some sort of system catalog tables where I can
    query.

    Thanks.


  • Ian

    #2
    Re: querying backup process

    Tambi Dude wrote:
    I am new to DB2. The version we are using is 8.2.3
    >
    I have to query DB2 to find out all backups for a given database and
    take following information
    >
    Backup Date, Start Time, End TIme, Status If failure, the error code.
    >
    >
    I am working on a script of someone else.
    >
    The command used is db2 list history backup since YYMMDD for DBNAME.
    >
    And then I have to filter out the information from the output.
    >
    Is there a better way. Like some sort of system catalog tables where
    I can query.
    >
    Yes, see the ADMIN_LIST_HIST ORY table function that was introduced in
    8.2. This gives you the ability to query this information with SQL.

    Comment

    Working...