Click here to Skip to main content
15,906,341 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??



Regards.
Posted

This Link helps me to deploy.... :)
Complete Procedure defined in simple and precise words along with the snaps... :)


http://learningsqlserver.wordpress.com/2011/02/13/how-can-i-open-mdf-and-ldf-files-in-sql-server-attach-tutorial-troublshooting/[^]
 
Share this answer
 
v2
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:
ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/59bc993e-7913-4091-89cb-d2871cffda95.htm
 
Share this answer
 
Comments
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