mardi 5 mai 2015

SQL RESTORE WITH RECOVERY; Hangs at 100%

I have done a lot of research about this.

I am attempting to recover a database with SQL Server 2014 and it keeps hanging at 100%.

A lot of people suggest that the solution is to just make sure that you restore with the RECOVERY option.

I have tried that and it still hangs at 100%. I have tried via the SSMS Restore dialog and I have tried running the following SQL Statement:

USE [master]
RESTORE DATABASE [MyDB]
FROM  DISK = N'C:\MyDB_backup_2015_05_05_010004_1506557.bak'
WITH  
    FILE = 1,  
    MOVE N'MyDB_Data' TO N'F:\MSSQL\DATA\MyDB.mdf',  
    MOVE N'MyDB_Log' TO N'F:\MSSQL\DATA\MyDB_1.ldf',  
    NOUNLOAD,  
    REPLACE,  
    RECOVERY,
    STATS = 2
GO

When I check the status of the command via:

SELECT r.status, r.command, r.wait_type
FROM sys.dm_exec_requests r
WHERE r.command like '%restore%' or r.command like '%backup%'

I get:

status: suspended
command: RESTORE DATABASE
wait_type: BACKUPTHREAD

Which from my reading implies that the RESTORE is waiting for a BACKUP to complete, but there is no BACKUP command returned from my query to sys.dm_exec_requests

So I'm at a loss...

Anyone got any ideas what's going on here or any tips on how to diagnose the issue?

Cheers!

Aucun commentaire:

Enregistrer un commentaire