Can't install database scripts

I have the apr ctp of sqlserver 2005 that came with beta2.  I know this must have been addressed before.  I did a number of searches installing databases, pubs, northwind, etc., but none of them addressed the problem.

I apologize in advance for going over old material.

I can navigate to the folders where the database scripts are - C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

However, I don't know what to do after that.

dennist685


Answer this question

Can't install database scripts

  • carlos2001mx

    "Luck" is pretty much waht you gonna need to get this stuff setup... As far I can tell this release has focused on functionality in the software... to the utter exclusion of any sensible install paths or installers... took me 3 tries to get SQL Server 2005 installed and took me 6 tries to install VS2005 on a clean Win2k3 box,

    though I gotta admit... I got a chuckle out of the time when the VS2005 installer told me it couldn't continue because the following apps were running... and the list contained one item: "THE VS2005 INSTALLER"... :)



    Oh well, I'm looking forward to playing with the actual stuff itself, and the "meat" of the systems appear rock solid as far as I can tell thus far, so... I will get off my soap box now...


    But here is what I went through to get the Sample database scripts installed when I didn't install them at the get go (the installer is totally differnet than any previous one and quite convoluted, so I didnt notice the "Advanced" button at the bottom)

    After I installed SQL Server 2005, I tried re-running the installer, and chose "Advanced", and then chose to install the sample databases, only to be told by the installer that the options I had selected wouldn't actually install anything so it wouldn't continue... even though I had selected options that I hadn't previously installed... FUN!

    So, I then looked for the SQL Server 2005 tools entry as stated in the above post... however there was none... So what I needed to do was the following:

    1. Go to Add/Remove Programs
    2. Choose "SQL Server 2005"
    3. Click Change
    4. Select "Workstation Components"


    Continuing through there will eventually take you to the "SQL Server 2005 Tools setup" where you can modify your installed sample apps and databases.

    Enjoy!

    -Max Schilling

  • dotnetnubie

    The information you have provided is a little confusing. Let's take a step back and get some basic information cleared up.

    In your original post, you said "I have the apr ctp of sqlserver 2005 that came with beta2."  From this I assume you mean the Beta 2 version of Visual Studio and SQL Server 2005 Express edition.  Is this correct   Can you run the following statement (from any database) and report the results

    SELECT SERVERPROPERTY('ServerName'), SERVERPROPERTY('InstanceName'), SERVERPROPERTY('Edition'), SERVERPROPERTY('ProductVersion');

    Then, you said "I can navigate to the folders where the database scripts are - C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. However, I don't know what to do after that."  From this it sounds like you actually have the AdventureWorks database installed, but you don't know how to attach the database or connect to it.  Can you confirm that the files AdventureWorks-Data.mdf and AdventureWorks_log.ldf are located in this directory

    Assuming the files are there, have you tried attaching the database   Can you run the following statement
    EXECUTE sp_attach_db @dbname=N'AdventureWorks', @filename1=N'C:\Program
    Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf',
    @filename2=N'C:\Program Files\Microsoft SQL
    Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'


    or have you tried connecting to the database using the Database Connection tool Can you try using these instructions
    From VS, click Tools and select Connect to Database.

    1.      In Add Connection, type the name of the server on which SQL Server  is installed. For example, if SQL Server Express is installed in the default location, which is the SQLExpress named instance, and is installed on the same computer as Visual Studio, you should type either Servername\SQLExpress or .\SQLExpress.

      1. Select Use Windows Authentication.
      2. From the Select or enter a database name drop-down list, select AdventureWorks.
      3. Click Test Connection. A dialog box appears confirming the connection. Click OK.
      4. Click OK to save the new connection.

    Regards,



  • TomDotNet

    Thanks, Dan.  I had tools installed.  I made the changes, installing the two database scripts - adventure works and darwish.  However, in server explorer, I can't actually find them.

    dennist685

  • DotNetParam

    Thank you for your comprehensive analysis.

    Now I have the final versions of vs studio 2005 and sqlserver 2005 installed. 

    My server is identified as your-02910f1df1.

    I selected mixed authentification, adding a password, because my windows authentification has no password; it's just dennist685, if I understand windows authentification correctly.

    I clicked tools, add datasource.  The dialog started with MicrosoftAccess Database File.

    I clicked change.

    The choices were
    Microsoft Access Database File
    Microsoft ODBC Data Source
    Microsoft SQL Server
    Microsoft SQL Server Database File
    Microsoft SQL Server Mobile Edition
    Oracle Database<other>

    I decided to try Microsoft SQL Server

    For server name I typed your-02910f1df1

    I left it at windows authentification
    On the dropdown list I chose AdventureWorks

    Test Connection Succeeded

    Mission Accomplished!

    I wish these instructions were in the documentation.

    Thank you

    dennist685


  • Guillaume J.

    schilm,

    I went through the steps you suggested, only to be told the databases were already installed  and attached to my instance.  However, I still can't find Adventure Works.  Where do I look

    dennist685

  • maikelnait

    If you have already installed the tools, go to Add/Remove Programs, select the SQL Server 2005 Tools entry and click Change. Follow the dialogs to add a components. Once you get to the feature tree there should be a node for Sample Databases. Select to install this feature. Continuing with the setup dialogs you should have an option for attaching it the sample databases to an existing instance of SQL Server.

    If you do not have any tools installed, rerun setup.exe from the original media. When you get to the "Components to Install" dialog click the "Advanced" button. Find the Sample Databases under the Client Components node. From here you can follow the steps above.

    Good luck.

    Dan

  • Can't install database scripts