Wednesday, February 03, 2010

Attaching a SQL Server database file (mdf) without an associated log (ldf) file

If you try and attach a mdf file that does not have an associated ldf file in SQL Server Management Studio, SSMS will throw an error. The simplest way around it is – click on the ldf file location in the dialog and click Remove. SSMS will then attach the MDF file and create the associated LDF file for you.

1 comment:

  1. Yesterday I was in unpleasant difficult situation. All my sql .mdf files were corrupted. And I used the the Google and saw there - best .mdf file repair utility. The utility solved my problem for seconds and free of charge as I bore in mind.

    ReplyDelete

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.