question

arunms avatar image
arunms asked

Restore database - stuck in Restore: Waiting for log zero on

I have been trying to restore a database from full backup. It progress to 100% as expected. After that it gets stuck in the step "Restore: Waiting for log zero on <databasename>" and it is stuck there for ever. It doesn't seem normal at all. Has anyone faced a similar issue. It has been running like that for more than a day now and I am unable to proceed.

Backup size: 36 GB

Data file size: 250 gb

Log file size: 60 GB

restore
10 |1200

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

Kev Riley avatar image
Kev Riley answered

I would have expected a message like that to show that you are waiting on the log file being initialized (zeroed), but over a day to do 60GB is a little excessive! It could also be that the log file contained a lot of in-flight transactions, and so it's now in the recovery stage, working out which transactions to roll forward and which to roll back.

Do you have the output of sp_whoisactive (or similar) to give a clue as to what is actually processing?

10 |1200

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

SmithSean avatar image
SmithSean answered

You can restore the database with Recovery:

RESTORE DATABASE Your_DB_Name WITH RECOVERY

check these references: https://www.stellarinfo.com/blog/sql-database-stuck-in-restoring-state/

https://www.mssqltips.com/sqlservertip/5460/sql-server-database-stuck-in-restoring-state/

10 |1200

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

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.