If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Rollforward and db connect problems

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-27-03, 19:24
niran niran is offline
Registered User
 
Join Date: Aug 2003
Posts: 2
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 !!!!
Reply With Quote
  #2 (permalink)  
Old 08-27-03, 20:02
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,348
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

Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 08-27-03, 23:45
quigleyd quigleyd is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 08-28-03, 03:39
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,348
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

Quote:
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.
Reply With Quote
  #5 (permalink)  
Old 08-28-03, 16:53
niran niran is offline
Registered User
 
Join Date: Aug 2003
Posts: 2
Quote:
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.
Reply With Quote
  #6 (permalink)  
Old 08-28-03, 19:27
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,348
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

Quote:
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On