Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to do ONLINE RESTORE ROLLFORWARDING TO END OF LOGS AND COMPLETE. When I run this command I am getting error SQL1035N The database is currently in use. It does not allow any connections to it!

If I deactivate database and then run command I can restore but then my database is not available for users but it should be becuase it is live production system 24/7. How to resolve this?

share|improve this question
    
Please don't cross-post. If you do, at least carry over the formatting fixes. (And why post with two different accounts?) –  Mat Feb 24 '13 at 15:53
    
Just to make sure I understand: you're doing a restore on a database that is actively being used? –  Mat Feb 24 '13 at 15:55
    
Yes it is actively being used. –  Dejan Feb 24 '13 at 16:32

1 Answer 1

[This answer was also posted to the duplicate question on Stack Overflow]

When you perform an online restore, DB2 must lock the tablespace(s) you are trying to restore. The restore process essentially overwrites the file on disk containing the tablespaces' data. This is incompatible with applications using data in the same tablespace while the restore occurs.

If your database has all data in a single tablespace, then an online restore is not particularly useful. If you have multiple tablespaces in the database, applications may be able to continue functioning while the corrupted tablespace(s) are restored, but of course this requires some planning in your application and database design.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.