VS 2005 RC and Running scripts to Create Databases

I have started using the starter kits for the VS Products mainly the Web Starter kits. The problem I have found is that I can not use the club starter kit because the database is of an incorrect version and can not be upgraded. What I have done is downloaded the Database creation scripts from MS Downloads. Next I created the blank database, and now I would like to run these scripts against the DB that I have created.

How do I run these scripts, First I thought that I should mention that I know how to create and work with SQL Scripts, but I would normally use the QA tool or osql. As I have only just started with the 2005 tools and database systems, I can not find a tool or option to execute a script against the database files. I know that I am missing something simple, but can some one please point me in the right direction.


Answer this question

VS 2005 RC and Running scripts to Create Databases

  • Sulaco

    Thanks for that, but I am using the express products that are shipped as part of the VS 2005 system. When using the starter kits it uses a pre built version of the mdf file for the database. The problem is that this file that ships with Club Starter kit has been prepared with the Beta 2 version and will not open with the RC version. I have tried to open it and the script returns back an error saying that the DB file has been created with a version that can not be upgraded to the current release. So the only open that I have is to recreate the file, I can either re create the tables SP and constraints manually, or run the sql script that is down-loadable from the MSDN Site.
    The thing is that I would prefer to run the script so that it is created correctly, and in turn this would be a learning process to work out how to do it with the IDE system. From memorey you used to be able to get a management interface for the express system, but this will not work with the RC Release. In my opinion we should be able to use the command lines tools to manage the files (like we used to use the osql tool to manage the MSDE edition of SQL 2000).
    In the future I would still like to use the SQL Express system that is available in the IDE as I would not like to have the full db management tools installed on a developer machine, I like the idea to have the developers use the built in functions and not have access to the full db management system.


  • Rob Swofford

    If you are using SQL Server 2005, open SQL Server Management Studio.  This is the replacement for SQL Server Enterprise Manager. When you have done that, connect using your credentials (just make sure you are a member of the local administrators group as you will be creating databases and objects in SQL Server). Now, the scripts that you downloaded include TSQL commands to create databases and the objects for you to use.  On SQL Server Management Studio, click File | Open | File then locate the *.sql file you downloaded.  Once loaded, hit the F5 key to run the script and that's it.

  • Sami Zaghloul

    I have tried to connect to it using the SQLCMD tool that is shipped with the prodct, but I can not work out how to conect to the mdf file (SQL Express File use when developing APS.NET Applications inside the visual studio IDE).

  • VS 2005 RC and Running scripts to Create Databases