Options

Restore aborting with error 3156 and 5121

I am trying to restore a database and it is failing stating abort request is preventing anything except termination errors. Below this line is error 3156 file cems_mod1 (cems is db name) cannot be restored SQLMemOpTables use with move to identify a valid location for the file. Then error 5121 path specified is not in a valid directory. I am copying database across network with redgate sql backup. I am restoring a whole list of databases and only one is failing. Can you please help with this issue?
Tagged:

Answers

  • Options
    It appears that the database cannot be restored to its original location, because the path/folders do not exist on this machine.  Try running this command:
    EXEC master..sqlbackup '-sql "RESTORE FILELISTONLY FROM DISK = [<backup file name>]"'
    to see where SQL Server will attempt to create the database files in.  Create those folders first if possible.  If not possible, then use the MOVE options to create the database files in a new location e.g.
    EXEC master..sqlbackup '-sql "RESTORE DATABASE mydb FROM DISK = [<backup file name>] WITH MOVE [mydb_data] TO [<fully qualified data file name>], MOVE [mydb_log] TO [<fully qualified transaction log file name>] " '



    SQL Backup - beyond compression
Sign In or Register to comment.