My restore ends with Msg 3013, RESTORE DATABASE is terminating abnormally. The message gives no reason. What do I check?
Msg 3013 is a generic message. Microsoft documents it as a sign that a backup or restore stopped unexpectedly, so the real cause sits in the messages above it. Read the line right before 3013 and match it:
1. Msg 3201 means SQL Server cannot open the backup device. Check the path and the file permissions for the SQL Server service account.
2. Msg 3156 with Use WITH MOVE means the target path for a data or log file does not exist. Add WITH MOVE with valid paths.
3. Msg 3241 or 3183 point to a damaged backup or a bad page in the backup. Execute RESTORE VERIFYONLY on the file.
4. Out of disk space on the target drive also ends the restore. Check the free space against the file sizes from RESTORE FILELISTONLY.
Microsoft lists the lack of permissions, the service account without access to the backup device and corruption as common causes.
The line above says Msg 3201 and operating system error 5. The file sits on a network share.
Operating system error 5 means access denied. The SQL Server service account needs read access to the share and to the folder. Your own login does not count, because the service reads the file. Grant read rights to the service account, use the full UNC path and avoid a mapped drive letter. Then restore again. If the file is still unreadable, copy it to a local drive and restore from there.
Service account had no rights on the share. Fixed. Thanks.