Blog of Mike Moser, containing my thoughts, comments and questions. RSS Feed


Remote Deployment of 2005 Database Projects

 

I like to use the 2005 Database Project when developing applications. 

image

*note which database project type I selected, there is a difference.

It's great for shops with localized development environments, which include a local database.  Once you are ready to deploy the database to QA, Staging, Production or any server other then local, you will quickly find that the IDE does not support this.

The build process will generate a .sql file in the configured location.

image

Take this file and place it on the target server.  You can then use the sqlcmd utility to execute the file.  You may wonder why you can't just run the sql manually.  The Database Project uses some syntax and features that require this type of execution.  I won't go into detail in this post, however here is an example of some of the syntax.

image

Now go to the local server and run the sqlcmd utility for the file:

image

 
Posted by Mike Moser | 1 Comments | Trackback Url | Bookmark with:        
Tags:

Links to this Post

Comments

Tuesday, 30 Oct 2007 02:00 by Run the SQL manually?
I'm not sure what you mean by "manually" but you don't have to use sqlcmd.exe. If you have SSMS on the target server you can open the script in there and enable "SQLCMD Mode" from the toolbar. -- Jason Stangroome http://www.codeassassin.com

Name:
URL:
Email:
Comments:

CAPTCHA Image Validation