
Where did I go wrong with Adventureworks ?
Adventureworks sample database launched with SQL Server 2012. Earlier we used Northwind and Pubs sample databases however Adventureworks has become a vital aspect of learning new features within SQL Server 2012 and you can downloaded from CodePlexsite(http://msftdbprodsamples.codeplex.com/releases ).
Every so often I run into something that
seems so simple that should just work but doesn’tL . I tried to attach the Adventureworks sample database (AdventureWroks2012 Data File) using SQL Server Management Studio
as follows,
® Right Click on Databases
® Attach
® click Add
® select the AdventureWorks mdf file
Then I noticed that message showing as not
found the AdventureWorks2012_Data_log.ldf file. Searching for
solution is a tedious task of sifting through jargon and unclear explanations these
are the simple steps that you can follows,
Step 01: Run SQL Server Management Studio as Administrator
Step 02: Execute the below script
CREATE
DATABASE AdventureWorks2012
ON (FILENAME = 'E: \AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG;
ON (FILENAME = 'E: \AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG;
Step 03 : Finally you can see New log
file ‘'E: \AdventureWorks2012_Data_log.ldf’
was created.
Enjoy learning !
RinZi ..
No comments:
Post a Comment