Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2002
    Posts
    456

    Arrow Unanswered: Rollforward query status

    Is it possible to run:

    db2 rollforward datatbase db-name query status


    command while rollforward is in progress? OS is NT and db is DB2 UDB V7 FP9

    dollar

  2. #2
    Join Date
    Mar 2003
    Posts
    343
    Yes

  3. #3
    Join Date
    Sep 2002
    Posts
    456
    But when I run it it gives me the error message as:

    C:\PROGRA~1\SQLLIB\BIN>db2 rollforward database test user administrator using test query status
    SQL1035N The database is currently in use. SQLSTATE=57019

    what I am doing wrong here....

    dollar

    Originally posted by cchattoraj
    Yes

  4. #4
    Join Date
    Mar 2003
    Posts
    343
    Here's an excerpt :

    A database rollforward operation runs offline. The database is not available for use until the rollforward operation completes successfully, and the operation cannot complete unless the STOP option was specified when the utility was invoked.

    A table space rollforward operation can run offline. The database is not available for use until the rollforward operation completes successfully. This occurs if the end of the logs is reached, or if the STOP option was specified when the utility was invoked.

    You can perform an online rollforward operation on table spaces, as long as SYSCATSPACE is not included. When you perform an online rollforward operation on a table space, the table space is not available for use, but the other table spaces in the database are available.

    So for the database and offline rollforward of a tablespace, the answer is no, but for an online rollforward of a tablespace, the answer is yes. I thought it could be done since in my mind it should be reading the logctl.lfh file/s, however, it looks like it holds an exclusive lock on the database for db and offline rfwds. The other reason I thought it could be done was because it's supposed to give the names of the log files it is done with and the one's that it needs. Sorry about my previous post.

  5. #5
    Join Date
    Sep 2002
    Posts
    456
    Actually I made use of the following command to get the required informaiton (rollforward command with query status did not work)

    db2 get snapshot for database test

    This command gave the output like this regarding rollforward operation along with other information:

    Database status = Rollforward
    Rollforward type = Database
    Rollforward last committed timestamp = 12-14-2003 00:06:20
    Rollforward log file being processed = 892702
    Rollforward status = Redo

    and thats exactly what I needed. All thanks to IBM folks and thanks cchattoraj for your time.

    dollar

    Originally posted by cchattoraj
    Here's an excerpt :

    A database rollforward operation runs offline. The database is not available for use until the rollforward operation completes successfully, and the operation cannot complete unless the STOP option was specified when the utility was invoked.

    A table space rollforward operation can run offline. The database is not available for use until the rollforward operation completes successfully. This occurs if the end of the logs is reached, or if the STOP option was specified when the utility was invoked.

    You can perform an online rollforward operation on table spaces, as long as SYSCATSPACE is not included. When you perform an online rollforward operation on a table space, the table space is not available for use, but the other table spaces in the database are available.

    So for the database and offline rollforward of a tablespace, the answer is no, but for an online rollforward of a tablespace, the answer is yes. I thought it could be done since in my mind it should be reading the logctl.lfh file/s, however, it looks like it holds an exclusive lock on the database for db and offline rfwds. The other reason I thought it could be done was because it's supposed to give the names of the log files it is done with and the one's that it needs. Sorry about my previous post.

  6. #6
    Join Date
    Mar 2003
    Posts
    343
    That is good to know. Is the system an MPP system?

  7. #7
    Join Date
    Sep 2002
    Posts
    456
    No, the system is not MPP. We run DB2 UDB v7.2 FP 9 on windows system but database is around 300G and the number of files to apply were around 30,000. We were taking the backup image of our production system and restoring it on another slow machine. Rollforward was reading the logs currently being written out from our production system (overflow log path parameter). So the speed at which rollforward was processing the logs was much slower than the speed at which the new logs were generated.

    By looking at the snapshot output we were able to determine that we still has 20,000 logs to process and with new logs written it will never finish so we tricked the system by moving one of the log file temporarily and rollforward thought it's the end of logs and it stopped itself.


    dollar
    Originally posted by cchattoraj
    That is good to know. Is the system an MPP system?

  8. #8
    Join Date
    Mar 2003
    Posts
    343
    That must have been a tricky situation! I mean you could have been in the middle of a transaction and never realize it.

    I would be curious about what db2 would say on a db snapshot for an MPP system. Maybe someday I'll find out the way I don't want to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •