If you had the same problem, the solution was to rename the logical file according to the database name. The following is an example of querying logical file names, and then rename the files:
-- retrieve the logical files for the current db SELECT [name] AS logical_file FROM sys.database_files df -- rename the logical file (to match the database name) ALTER DATABASE YourDB MODIFY FILE (NAME = 'LogicalFile1', NEWNAME='NewLogicalFile1') GO ALTER DATABASE YourDB MODIFY FILE (NAME = 'LogicalFile2', NEWNAME='NewLogicalFile2') GO
The reason for the two changes is that there are usually two files associated with each database, data file, and log file.
source share