Impossible to attach Adventureworks

  • What build are you running i.e. -

    SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

  • Hi Tommy

    SELECT SERVERPROPERTY('productversion') as Product_version, SERVERPROPERTY ('productlevel') as Product_Level, SERVERPROPERTY ('edition') as Edition

    Details are as below about my Server.

    Productversion : 8.00.2187

    Productlevel : SP4

    Edition : Developer Edition

    -Regards,

  • You have installed SQL 2000 with compatibility mode 80, and AdventureWorks has a compatibility mode 90.

    This mean that AdventureWorks has data types, schemas, etc, not supported by SQL 2000

    Francisco Racionero
    twitter: @fracionero

  • Hi Francisco,

    I have got both SQL Server 2000 and 2005 installed on my system.

    I am getting same result for the query in both the server.

    i.e.

    SELECT SERVERPROPERTY('productversion') as Product_version, SERVERPROPERTY ('productlevel') as Product_Level, SERVERPROPERTY ('edition') as Edition

    Above query returns same result in both 2000 and 2005.

    8.00.2187SP4Developer Edition

    Shall I uninstall 2005 and install it again? or what else I should do to get adventureworks DB on my system?

    Please suggest.

    --Regards

  • What version of MSSQL 2005 do you think you have installed? If the Express version, have you downloaded and installed the Express edition of Management Studio? You cannot administer a 2005 database engine using 2000 tools (Enterprise Manager).

    When you have Management Studio up and running, you will be able to attach the AdventureWorks DB without a hitch.

    Andy

  • Hi,

    Here is details of SQL server 2005 on my system.

    After clicking on Help --> about in Management studio, i get following details

    Microsoft SQL Server Management Studio: 9.00.3042.00

    Microsoft Analysis Services Client Tools: 2005.090.3042.00

    Microsoft Data Access Components (MDAC): 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)

    Microsoft MSXML:2.6 3.0 4.0 5.0 6.0

    Microsoft Internet Explorer:6.0.2900.2180

    Microsoft .NET Framework:2.0.50727.42

    Operating System:5.1.2600

  • USE [master]

    GO

    CREATE DATABASE [Adventureworks] ON

    ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf' ),

    ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Log.ldf' )

    FOR ATTACH

    GO

    if not exists (select name from master.sys.databases sd where name = N'Adventureworks' and SUSER_SNAME(sd.owner_sid) = SUSER_SNAME() ) EXEC [Adventureworks].dbo.sp_changedbowner @loginame=N'sa', @map=false

    GO

    Try using this..Give the respective mdf and ldf path .

  • Having SSMS installed doesn't mean you're running SQL server Express. Are you connecting to the correct database server instance? Remember - you can use SSMS against 2000 databases (for some things), but that only goes so far. Attaching DB's is one thing that tends to foul up.

    Do you have a service called "SQL Server (<instancename>)" which would be the 2005 version, vs the 2000 service called something like MSSQL$<instance>? Is it running?

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • I agree, it looks like you have the right version of Management Studio, but check you are connecting to the right database engine. On the left, in Object Explorer, check which Database Engine(s) are listed - their version number is in brackets.

    If you are not connected to a version 9.00 database engine, click on Connect, then Database Engine.

    Andy

  • Hi Guys,

    I managed to attach adventureworks DB.

    The actual problem with my system was SQL Server 2000 and SQL Server 2005. I have both the servers installed.

    SQL Server 2005 was installed on SQL Server 2000 and SQL Server 2000 was taken as working instance.

    Bcos of this even when I check for the version details in SQL Server 2005, i was getting it as 8...... which should ideally be 9.....

    I simply uninstall both SQL Server 2005 and SQL Server 2000 and installed SQL Server 2005 again.

    And now every thing works fine.

    Thanks to everyone who spared their crusial time for me.

    --Regards,

    Fakruddin Mansuri

  • Hi All,

    I've tried all the above mentioned ways to attach adventureworksdb for 2005 (including executing instawdb.sql) but without success 🙁

    I've been struggling with this problem for a week now.

    Any help will be greatly appreciated.

    Kind regards

    Ghoezayma

  • Hi,

    I have also tried all the possible solutions mentioned (including running the instawdb.sql file) but all failed with the same error.

    Any help will be greatly appreciated.

    Kind regards

    Ghoezayma

  • Hi

    Can you pls tell me what error message you are getting?

    Which version u r using?

    Do u have only one server or more than one server?

    In case of more than once server, which is ur active instance?

    --Regards,

    Fakruddin Mansuri

  • Hi,

    I've also got 2 instance (2000 and 2005) installed on my machine.

    And the active instance is 2000 🙁

    Is there any way I can change the active instance to point to 2005 instead?

    Or will I have to uninstall and reinstall both?

    I have setup 2005 on my virtual pc for now so I am at least able to start with the SSIS exercises.

    Thanx for the help.

    Kind regards

    Ghoezayma

  • Are you sure you have the SQL 2005 version of the AdventureWorks database. We ran into this and it was due to the fact that we had downloaded the SQL 2008 version instead of the SQL 2005 version.

Viewing 15 posts - 16 through 30 (of 33 total)

You must be logged in to reply to this topic. Login to reply