none
Contoso BI database download not compatible with SQL Server 2008 R2? RRS feed

  • Question

  •  

    Running SQL Server 2008 R2 locally on a Windows 7 machine, I'm trying to load the Contoso BI sample database, obtainable at http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=18279.

    I run the executable to unpack the backup file to my SQL backup directory. In SQL Management Studio. I execute a "create database" command to have a database to restore to. I then right click on the new database in the Object Explorer and select Tasks => Restore => Database. When I specify a restore from device and navigate to select the .bak file, I get the following error:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ContosoRetailDW.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476

    The link in the error message offers no further information.

    Has anyone been able to get Contoso loaded into 2008 R2?


    - Mark Z.
    Tuesday, July 19, 2011 5:24 PM

Answers

  • Hello Mark,

    MSSQL.1 and MSSQL10_50.MZ2008, that sounds like you have at least 2 (named) instances installed on you machine.

    - Please ensure you are connected to the right instance. Use .\MZ2008 as server name to connect to the named instance of 2008R2. In Object Explorer you can see the version number beside the instance name, it should be 10.50.xxx; if it's 9.0.xxx then you are connected to 2005. Additional you can check it with

    SELECT @@version
    

    - Because it was a download please check if the backup file may is blocked. In Windows Explorer => File Properties you may "Unblock" the file.

    - If this all don't work then may the backup file is corrupt. Download and extract it again.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    • Marked as answer by Mark Zudeck Wednesday, July 20, 2011 3:56 PM
    Wednesday, July 20, 2011 3:35 AM
    Moderator
  • Hi,

    I just tested it on my SQL Server 2008 R2 instance (10.50.2500 SP1), it worked fine. Please make sure you are really connecting to an instance of SQL Server 2008 or later - run SELECT @@VERSION to test as Olaf said.

    Here are the steps I did:

    1. Download the relation database from the linked you posted.
    2. Run the exe file and extract the database to any folder that you have appropriate permission to restore the database.
    3. Open SSMS, connect to an instance of SQL Server 2008 or later (Run SELECT @@VERSION to confirm)
    4. Right-click the Databases, select Restore Database option and choose the back up file extracted in step 2 to restore.

    Hope this helps.


    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    • Marked as answer by Mark Zudeck Wednesday, July 20, 2011 3:57 PM
    Wednesday, July 20, 2011 7:19 AM
    Moderator

All replies

  •  

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ContosoRetailDW.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)


    - Mark Z.


    Hello,

    First, in the System Requirements it's mentioned that's for SQL Server 2008; not for 2008R2.

    Sure you use a SQL Server 2008R2? The base folder MSSQL.1 is in common used by SQL Server 2005 (ok, and of cause a migrated 2008/2008R2 from 2005 server).


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    Tuesday, July 19, 2011 5:51 PM
    Moderator
  • Olaf, I am indeed running 2008 R2.  I just tried restoring from the C:\Program Files\Microsoft SQL Server\MSSQL10_50.MZ2008\MSSQL\Backup folder, and the result is the same.

    It would be strange if the database wasn't useable with R2, since the Wrox book "Professional Microsoft® PowerPivot for Excel® and SharePoint®" includes the following setup steps:

    3.  Install SQL Server from the SQL Server 2008 R2 release. Alternately, you can use an existing
    SQL Server 2008 instance.
     

    4.  Download the Contoso sample database ContosoBIDemoBAK. exe from http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=868662dc-187a-4a85-b611-b7df7dc909fc and extract the Contoso relational backup fle.
     

    5.  Connect to your SQL Server relational database server using SQL Server Management Studio
    and restore the Contoso retail sample database on your SQL Server instance.


    - Mark Z.


    Tuesday, July 19, 2011 6:45 PM
  • Hello Mark,

    MSSQL.1 and MSSQL10_50.MZ2008, that sounds like you have at least 2 (named) instances installed on you machine.

    - Please ensure you are connected to the right instance. Use .\MZ2008 as server name to connect to the named instance of 2008R2. In Object Explorer you can see the version number beside the instance name, it should be 10.50.xxx; if it's 9.0.xxx then you are connected to 2005. Additional you can check it with

    SELECT @@version
    

    - Because it was a download please check if the backup file may is blocked. In Windows Explorer => File Properties you may "Unblock" the file.

    - If this all don't work then may the backup file is corrupt. Download and extract it again.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    • Marked as answer by Mark Zudeck Wednesday, July 20, 2011 3:56 PM
    Wednesday, July 20, 2011 3:35 AM
    Moderator
  • Hi,

    I just tested it on my SQL Server 2008 R2 instance (10.50.2500 SP1), it worked fine. Please make sure you are really connecting to an instance of SQL Server 2008 or later - run SELECT @@VERSION to test as Olaf said.

    Here are the steps I did:

    1. Download the relation database from the linked you posted.
    2. Run the exe file and extract the database to any folder that you have appropriate permission to restore the database.
    3. Open SSMS, connect to an instance of SQL Server 2008 or later (Run SELECT @@VERSION to confirm)
    4. Right-click the Databases, select Restore Database option and choose the back up file extracted in step 2 to restore.

    Hope this helps.


    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    • Marked as answer by Mark Zudeck Wednesday, July 20, 2011 3:57 PM
    Wednesday, July 20, 2011 7:19 AM
    Moderator
  • Olaf and Alex, you two were right.

    My bad.  Although I was using the 2008 R2 Management Console, I was connecting to a 2005 server.  Below is the command that worked for me.

    Thanks!

    - Mark

    ---------------------------------------------------------------------------

    RESTORE

    DATABASE ContosoRetailDW

    FROM

    DISK =

    'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MZ2008\MSSQL\Backup\ContosoRetailDW.bak'

    WITH

    REPLACE, MOVE 'ContosoRetailDW2.0' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MZ2008\MSSQL\DATA\ContosoRetailDW.MDF'

    ,

    MOVE

    'ContosoRetailDW2.0_log' TO

    'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MZ2008\MSSQL\DATA\ContosoRetailDW.LDF'

    Wednesday, July 20, 2011 3:56 PM