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
Error "At least one file is needed for database attach" for DB attach
原文:https://www.cnblogs.com/muzilingling/p/9070627.html