Forum Discussion
komail_2811
Dec 08, 2023Copper Contributor
How To Attach MDF File Without Log File
Hi, I have one MDF file without LDF file when attach this file to sql i have this error , how to solve this problem ? in first step : USE master
GO
EXEC sys.sp_attach_single_file_db @dbnam...
olafhelper
Dec 18, 2023Bronze Contributor
komail_2811 wrote:Hi,
I have one MDF file without LDF filewhen attach this file to sql i have this error , how to solve this problem ?
Error : The FOR ATTACH option requires that at least the primary file be specified.
komail_2811 , the error message is not complaining about a missing LOG file, it says the file isn't a valid primary database file.
- komail_2811Jan 09, 2024Copper ContributorThanks
but How to solve this problem ?- olafhelperJan 09, 2024Bronze ContributorTo solve it you have to get the right&all database files.