Managing Changes to Databases and Database Servers
By using Visual Studio Team System Database Edition, you can help your development team manage changes to databases and database servers by creating a database project or a server project and putting it under version control. Members of your team can then check out files to make, build, and test changes in an isolated development environment, or sandbox, before sharing them with the team. To help ensure code quality, your team can finish and test all changes for a particular release of the database in a staging environment before deploying the changes into production.
In the following table, you can find descriptions of common tasks that support this scenario and links to more information about how you can successfully complete those tasks. In addition, you should determine how these tasks best fit into the development methodology of your team.
Starting team database development: To manage changes in Database Edition, you first create a database project or a server project. In most cases, your team is updating an existing production database or server that already contains some objects and settings. You can import those objects and settings into the project and configure it with the settings that you want the team to use. You might also establish a plan that developers and testers use to generate test data. When you are ready to share the project and its settings with the rest of the team, you put the files that are associated with the project under version control.
You might need to have your database administrator (DBA) import the objects and settings into your project if you do not have read access to the production database.
Preparing for database development: After you create your database project, you might want to perform additional tasks before the team starts to update the database. Before you start to perform iterative development tasks, you should configure your database project to match your target deployment environment. After you configure the database project, you can build and deploy the database to your isolated development environment to verify that the build and deployment settings are correct.
Performing iterative database development: If you are a developer or a tester, you check out parts of the project and then update them in an isolated development environment. By using this type of environment, you can test those changes without affecting other members of the team. After the changes are complete, you check the files back into version control, where other team members can obtain your changes and build and deploy them to a test server.
Building and deploying databases to staging or production environments: If you act as the database administrator for your team, you can deploy a version of the database project or the server project into staging or production environments.
Maintaining deployed databases: After you deploy a database into a staging or production environment, you will probably need to perform additional tasks to keep your database and its development running smoothly. For example, you might need to synchronize the data on your staging and production servers, apply a critical update directly onto the staging server, or perform routine maintenance tasks.
Prototyping, verifying test results, and modifying database scripts and objects: You can use the Transact-SQL (T-SQL) editor to perform any one of these common tasks.
Editing Database Scripts and Objects with the Transact-SQL Editor
Troubleshooting: If you encounter problems when you are trying to manage changes to databases or database servers, the topics in this section might help you identify and resolve those problems.