Error "At least one file is needed for database attach" for DB attach

While we want to attach a singal .MDF file(without log file) for a DB in SQL SERVER, we will meet the problem "At least one file is needed for database attach" enven if renamed the MDF to the same name with target DB.

we can use the cmd as below:

CREATEDATABASE AdventureWorks2008R2 ON

(FILENAME=N'E:\SQLBI\AdventureWorks2008R2.mdf')

FORATTACH

GO

猜你喜欢

转载自www.cnblogs.com/muzilingling/p/9070627.html