Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Unanswered: Rollforward and db connect problems

    I am facing problems with a database rollforward db to end of logs. The log files are backed up using a user exit and so has timestamp appended to the SQL0112918.LOG files. However I don't have user exit enabled on my machine and so the rollforward is not able to know these log files having the timestamp as the extension. Due to time constraints, I restored these files from TSM server to a dummy directoy and then copied them to the active log directory and renamed them to have just the .LOG extension and issued the command:
    rollforward db <dbname> to end of logs.

    However the rollforward was still looking for the next file. I knew that I have provided the last log file (as listed in the history information) and so I issued a rollforward complete command.
    The database was still in the rollforward state. I stopped db2 (db2stop) and then db2start. This took the database out of rollforward state and restore pending state but now I have a diff problem now.
    I cannot connect to the database, it comes out with SQL0293N error. which is error accessing a table space container. ANY HELP PLEASE !!!!

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Rollforward and db connect problems

    My approach will be :

    1) Copy the current active log directory to some location, just in case you loose the logs ..

    2) Check the db2diag.log file to see which tablespace reports the error ..

    3) From the same backup image, restore only that tablespace ...

    4) ROLLFORWARD QUERY to see what the status is ...

    If it is beyond the point I want, I'll prefer to go back to the full database restore and use ROLLFORWARD to some point following the backup end timestamp and see what the message says and take it from there ...

    Cheers

    Sathyaram

    Originally posted by niran
    I am facing problems with a database rollforward db to end of logs. The log files are backed up using a user exit and so has timestamp appended to the SQL0112918.LOG files. However I don't have user exit enabled on my machine and so the rollforward is not able to know these log files having the timestamp as the extension. Due to time constraints, I restored these files from TSM server to a dummy directoy and then copied them to the active log directory and renamed them to have just the .LOG extension and issued the command:
    rollforward db <dbname> to end of logs.

    However the rollforward was still looking for the next file. I knew that I have provided the last log file (as listed in the history information) and so I issued a rollforward complete command.
    The database was still in the rollforward state. I stopped db2 (db2stop) and then db2start. This took the database out of rollforward state and restore pending state but now I have a diff problem now.
    I cannot connect to the database, it comes out with SQL0293N error. which is error accessing a table space container. ANY HELP PLEASE !!!!
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    You could also leave the logs in the log directory and issue db2 rollforward db sid complete, if it has all the logs it needs, it will commit and roll back any transactions that it needs and bring the db online.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I agree with you, quigleyd ...

    When I recommended to copy the logs to another location, it was just to be on a safer side ... Sometimes, you happen to loose the logs, mostly human error ...

    Cheer
    Sathyaram

    Originally posted by quigleyd
    You could also leave the logs in the log directory and issue db2 rollforward db sid complete, if it has all the logs it needs, it will commit and roll back any transactions that it needs and bring the db online.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Aug 2003
    Posts
    2
    Originally posted by quigleyd
    You could also leave the logs in the log directory and issue db2 rollforward db sid complete, if it has all the logs it needs, it will commit and roll back any transactions that it needs and bring the db online.

    How long does a rollforward take. Anybody had problems with no tags or wrong tags attached to the container files which makes them inaccessible. Thanks.

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I personally don't think there is a right answer for 'How long does it take to rollforward' ... sorry ..

    BTW , have you resolved the problem ? What does db2diag.log say ?

    Sathyaram

    Originally posted by niran
    How long does a rollforward take. Anybody had problems with no tags or wrong tags attached to the container files which makes them inaccessible. Thanks.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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