question

rakeshsingh1983 avatar image
rakeshsingh1983 asked

Why can’t we take a backup of a database which is in standby or in recovery mode?

Why can’t we take a backup of a database which is in standby or in recovery mode?
backup
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Kev Riley avatar image
Kev Riley answered
A backup takes a page-by-page copy of the database in a state that is transactionally consistent. When a database is in standby or recovery, it is not in a transactionally consistent state - standby uses a copy-on-write process to store data in a standby file, recovery is waiting for either more transaction log records, or recovery phase (undo, redo) to finalise the db. So if you could take a backup at this point, you could never recover from it - so no point taking a backup!
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev's answer is right on point, but I want to add one comment. It doesn't sound like this applies in your case, but there is an optional CONTINUE_AFTER_ERROR option to backup a database that is corrupt.
2 Likes 2 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.