IT Knowledge Base

Technical Repository

HowTo: SQL Server 2008/2012 – Determining how long a database will be in RECOVERY

If you SQL Server crashed in the middle of a transaction, you can use the following queries to get a rough idea as to how much time is left in the RECOVERY stage before the database is consistent again. DECLARE @DBName VARCHAR(64) = ‘databasename’ DECLARE @ErrorLog AS TABLE([LogDate] CHAR(24), [ProcessInfo] VARCHAR(64), [TEXT] VARCHAR(MAX)) INSERT INTO […]

Read More