There are many different kinds of projects in a BI project, the larger part of which is the processing of the DB script. However, the DB script cannot be maintained in the project after all, so here is how to maintain the version of the DB script.
Database scripts themselves do not have project template support and are difficult to version management maintenance, usually only through file scripting, such as the definition of DB through a task to export to a file.
This method can be used to export related objects, tables, views, stored procedures, and functions in the DB to a file. The disadvantage is that each time you export it is difficult to know where each export followed the last version change.
Another way to do this is through the tools in Visual Studio, where the Visual Studio version 2013 is primarily shown.
Create a new SQL Server database project.
After you create a new project, select Tools, under SQL Server, "new Schema Compare ...".
The system opens the schema comparison tool, which mainly compares the architecture of two data sources for any differences.
First click on the left to select the data source.
Click Select Source ...
Select the database, and then create a new database connection.
Connect to the target database. Here is a demonstration using Microsoft's official sample database.
Then select the target.
Select the project on the target side, and then select the project you just created by selecting the drop-down box.
When you have set the Contrast object, click the Compare button.
The system compares the differences between the two ends. Because the project is empty, each object is new to the data source.
Click Update to sync the code on the left to your project.
In the solution Manager, you can see the database object files that were synchronized. This allows us to synchronize the database's script file to the project file.
Next, we'll show you how to get the changes in the database using this tool. First, in the function definition in the database, add a few pieces of test text as a test to see how the tool recognizes the differences in the script.
Back to the project you just created, click Compare again to see the system recognize the change. The details of where the code has changed can be seen clearly in the comparison screen below.
Click Sync to sync the changes to the project.
Open the source Explorer and you can see that the corresponding file becomes a checked-out state.
Check in the code, by the way, with comment, so that the follow-up can be traced back to the relevant content of the change.
This article describes a method for database code versioning. Versioning of database code is important in any project, especially BI projects, and although there is no ready-made project template support, the Visual Studio's architecture comparison tool can assist in versioning the database code.
[Bi Project note]-db script synchronization