Find the below steps to attach a DB from
.mdf file
a.
Connect to the DB server
b.
Right click on the DB sever and select Attach..
c.
Click on the ADD button and Browse to the .mdf
file
d.
Select the file and click on OK button.
or fire the below query to attach the DB
CREATE DATABASE MyAdventureWorks
ON (FILENAME = 'C:\MySQLServer\AdventureWorks_Data.mdf'),
(FILENAME = 'C:\MySQLServer\AdventureWorks_Log.ldf')
FOR ATTACH;
No comments:
Post a Comment