I downloaded SQL Server 2012 RC0 today and the sample database to poke around from here. The download contains the data file (mdf file) of adventure works but not ldf. For a moment, I thought why would codeplex not include ldf file - it seems that it is indeed possible to attach a database without ldf file.
Head over to CREATE Database on BOL and CTRL+F for " FOR_ATTACH_REBUILD_LOG"
Script below:
Head over to CREATE Database on BOL and CTRL+F for " FOR_ATTACH_REBUILD_LOG"
Hello Kuppala,
ReplyDeleteYou can also attach your database by below method.
CREATE DATABASE AdventureWorks2008R2 ON
( FILENAME ='C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Data.mdf')
FOR ATTACH
GO
Regards,
Mark Willium
Blog
Thanks Mark!
ReplyDelete