How can I deploy only the stored procedures have been check-in on Source control?  
Author Message
Joe waye





PostPosted: Visual Studio Team System - Database Professionals, How can I deploy only the stored procedures have been check-in on Source control? Top

My database project have been create from existing database by import shema database. I put my database project under source control. I check put a stored procedure to modify something but I have not yet check in the stored. After that, I built the project and deploy(with update option) back into the existing database . Oh my God, I saw the changes in the stored(have not yet check in on source control) have been update into the database, why is the stored have not been check in but It is deploye into database How can I deploy only the stored procedures have been check-in on Source control Is there any way to do that



Visual Studio Team System23  
 
 
Sachin K





PostPosted: Visual Studio Team System - Database Professionals, How can I deploy only the stored procedures have been check-in on Source control? Top

There is nothing wrong in what happened in your case. It will update to the database what you have at your machine.

Source control is a place to preserve your changes, and make it available to other developers and DBA's

Normally, developers would do the changes to the database objects, and check it in to Source control. And than DBA would use his machine to get the latest version from the source control (So notice that the latest code (what a developer checked in) will be on his machine now), and it will be deployed.

So in nutshell, one would deploy only what he has on the machine, and guideline is that one should sync it with the source control before deploying so that one doesn't loose the changes.

-Sachin Kumar


 
 
StevenPo





PostPosted: Visual Studio Team System - Database Professionals, How can I deploy only the stored procedures have been check-in on Source control? Top

Joe -

If you haven't taken a look at the overview product documentation, you might find it helpful, particularly the "Managing Database Change" topic. To quicky summarize, the idea is that there are typically several copies of a database in use:

  • a Production database, access to which is controlled carefully in most enterprise environments.
  • a Staging database, which is used as the final test before you deploy changes into production
  • one or more isolated development environment databases. These are private copies of the database that each developer (or tester) uses to work on changes.

Team Edition for Database Professionals is primarily focused at making it easy to work with the third sort (isolated development environments). The typical iterative development task being to check out the parts of the schema that you need to change, deploy them to your local isolated development environment, test those changes, then check them in when you're done.

At some point, a version of the checked in files is labelled, someone syncs to that label and generates the build script that will be deployed to the staging server where it can be tested. It may be necessary to iterate on that deployment script, either by tweaking the database project, or by making modifications to the build script directly. When everything looks good, the deployment script will be deployed into production.

You could use TEDP to deploy directly to production, but that's not the process that we advocate or that we expect folks to use. And when you're deploying to your isolated development environment, you definitely want to deploy your local (not-yet-checked-in) changes, so you can test them.

Let us know if that addresses your concerns or if you have additional questions or feedback.

thanks,



 
 
StevenPo





PostPosted: Visual Studio Team System - Database Professionals, How can I deploy only the stored procedures have been check-in on Source control? Top

Joe -

Have we answered your question, or did you need additional information



 
 
Gert Drapers





PostPosted: Visual Studio Team System - Database Professionals, How can I deploy only the stored procedures have been check-in on Source control? Top

In general if you have objects in your project that you do not want to deploy, you should be able to change the Build Action in the property window to "Not in Build" instead of "Build"

This way the project will still function as the container, but we will not deploy the content of the file.

-GertD