SQL Server Snapshot Creation Error - "All files must be specified for database snapshot creation"
There are several reasons where you will get this error, but I’m going to talk about the one I faced and can be fixed in seconds. I was working with an IMDB dataset. The reason for my error was a database rename. I created the database initially with the name “IMDB” and later renamed it to “IMDB_001”.
Command:
CREATE DATABASE IMDB_001_snapshot ON ( NAME = IMDB_001, FILENAME ='--path--\IMDB_001_snapshot.ss' ) AS SNAPSHOT OF IMDB_001;
Error: All files must be specified for database snapshot creation. Missing the file “IMDB”. (5127) (SQLExecDirectW)’)
Fix (Using SSMS):
Right-click on the database > Properties > (left menu)Files > Rename the file logical names to current database name (in my case to IMDB_001)
Enjoy Reading This Article?
Here are some more articles you might like to read next: