Click here to Skip to main content
15,672,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My Friend just send me the .mdf and .ldf files of his database.. I wanted to deploy those on my machine.. having SQL Server 2008.... can anyone tell me about that??


This Link helps me to deploy.... :)
Complete Procedure defined in simple and precise words along with the snaps... :)[^]
Share this answer
Suppose the .mdf and .ldf are specifically the AdventureWorks2008R2:
EXEC sp_attach_db @dbname = N'AdventureWorks2008R2', 
    @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\AdventureWorks2008R2_Data.mdf', 
    @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\AdventureWorks2008R2_log.ldf';

Straight out of BOL:
Share this answer
VICK 15-May-13 1:32am    
Need a lot of explanation to a novice like me.. :( i.e. its of Expert level answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900