It is recommended that you backup your database every day. Please note that at the time of server crash backup files are the main resources for recovery. However attaching .MDF files are always the second option.
The steps to attach an .MDF file are.
You can use Microsoft SQL Server Management Studio Express attach MDF file.
- Start > Programs > Microsoft SQL Server 2005
- Open Microsoft SQL Server Management Studio Express
- Connect the server
- Right click on Database in Object Explorer
- Will find a list of options
- Click on Attach
- Click on Add
- Select .Mdf file from browse screen
- Click ok on browse screen
- Delete log file using remove button
- Click Ok and the database should attach.