In this article I will like to tell
you how to add the MDF file to SQL server 2008.
First open the “Microsoft SQL Server Management Studio”
via Start Menu of Windows.
Please log in to require database.
Open the required database as Shown
below
< image >
Right click on “Database” and click
“Attach..”
You will see a pop-up window . Then
click “ADD” button you will get following
One more Pop-up window Occurs.
Browse throght and click on folder which has your required “.mdf” file.
Note : if you have a MDF file , it
is better to put that in below folder : C:\Program Files\Microsoft SQL
server\MSSQL10_50.databasename\MSSQL\DATA\
After browsing through the folder and
finding the require mdf file , select the file and it shows windows as follows
Now click “ADD catalog” button. It will
execute and the database (tables and all Db objects) are restored / added back
to newly created database.