SQL SERVER – Installing AdventureWorks for SQL Server Denali

I just began with SQL Server 2011 Denali CTP1. The very first thing, I realized that there is no AdventureWorks Sample Database available for Denali. I quickly searched online and reached to Microsoft documentations where it provides information of the how to install (restore) AdventureWorks for SQL Server 2011 for Denali.

  1. Download the AdventureWorks from here.
  2. Run following script (replace your path of mdf file.

CREATE DATABASE AdventureWorks2008R2
ON (FILENAME = 'C:\SQL 11 CTP1\CTP1\AdventureWorks2008R2_Data.mdf')
FOR ATTACH_REBUILD_LOG ;

When you run above script it will give you following message and you are DONE!

File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Log.ldf" may be incorrect.
New log file 'C:\SQL 11 CTP1\CTP1\AdventureWorks2008R2_log.ldf' was created.
Converting database 'AdventureWorks2008R2' from version 679 to the current version 684.
Database 'AdventureWorks2008R2' running the upgrade step from version 679 to version 680.
Database 'AdventureWorks2008R2' running the upgrade step from version 680 to version 681.
Database 'AdventureWorks2008R2' running the upgrade step from version 681 to version 682.
Database 'AdventureWorks2008R2' running the upgrade step from version 682 to version 683.
Database 'AdventureWorks2008R2' running the upgrade step from version 683 to version 684.

Here is the video on the same subject. The video also contains the latest AdventureWorks database.

I will soon write my experience about Denali. However, SQL Server Management Studio more started to look alike Visual Studio.

Reference: Pinal Dave (http://blog.sqlauthority.com)

About these ads

8 thoughts on “SQL SERVER – Installing AdventureWorks for SQL Server Denali

  1. You just forgot to mention the important point here that not to install CTP version to the productive environment. It is not at all recommended by Microsoft. The best option is either to use the Test system or Virtual machine.

  2. Pingback: SQL SERVER – Adventure Works for SQL Server 2012 RC0 – Samples Database for SQL Server 2012 RC0 « SQL Server Journey with SQLAuthority

  3. I am still having trouble downloading the database. I followed the instructions exactly and I am getting the following error

    CREATE DATABASE AdventureWorks2008R2
    ON (FILENAME = ‘C:\Users\brevelant\Desktop\SQL Statements\AdventureWorks2008R2_Data’)
    FOR ATTACH_REBUILD_LOG ;

    Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file “C:\Users\brevelant\Desktop\SQL Statements\AdventureWorks2008R2_Data” failed with the operating system error 5(Access is denied.).

  4. getting an error:

    Cannot use file ‘E:\MSSQL\Data\AdventureWorks2008R2_Data.mdf’ for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it.

    Please help.

  5. Getting same error as Brayan…
    Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file “C:\Users\……..\AdventureWorks2008R2_Data” failed with the operating system error 5(Access is denied.).

  6. Pingback: SQL SERVER – Weekly Series – Memory Lane – #006 « SQL Server Journey with SQL Authority

  7. HI I tried, and got the following message:

    File activation failure. The physical file name “C:\CodePlex Database\AdventureWorks2012_log.ldf” may be incorrect.
    The log cannot be rebuilt when the primary file is read-only.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s