The same repository can be set as a destination, and ApexSQL Diff can compare the current state on the repository (latest version), with the previously selected label. On a destination side, an appropriate target needs to be selected and configured: To compare a label with any of the mentioned sources, in the ApexSQL Diff Project form, set the Source control option from the source drop down list:įrom the Source control wizard, in the System login step, the Ver s ion section at the bottom must be set to Get by label and the appropriate label should be selected: The label will be created on the repository:ĪpexSQL Diff is a tool that can compare and synchronize source control label with various database sources such as live database, database backup, database snapshot, or local folder that contains SQL scripts. In the Label form, specify a label name and a description (optional) and click the Create button: ![]() When the database is linked with objects committed to the repository, a label can be created from the ApexSQL Source Control menu, in the Object Explorer, by clicking the Create label option: Using ApexSQL Source Control to create a new labelĪpexSQL Source Control, on another hand, requires the database to be linked to the repository where the label will be created, and at least having database objects initially committed. If the Labels tab is set as current, previously created label will be shown: After the initial commit of all objects, which is done automatically by ApexSQL Script, a label with the specified name will be created.įor the purpose of the article, TFS source control system is used, therefore the created label can be found under the history of the source control project. In the Label field, specify a label name:ĪpexSQL Script will create a separate script for all selected database objects along with the appropriate structure on the repository that can be used by other ApexSQL tools. In the Output file step, under the General tab, choose the Create and commit to source control option, and use the Edit button to specify the source control system and repository information where the label will be created. Select the Structure scripting mode and the T-SQL output type: Using ApexSQL Script to create a new labelĬonnect to a database that you want to create a source control label for, by initiating a new project and selecting the particular database:Īfter ApexSQL Script finishes analyzing the database, select objects that will be included in the label and click the Script button to initiate the Script wizard. ![]() ![]() The result will be the same, but achieved in two ways. To create an entirely new version of label of a database schema, you can use either ApexSQL Source Control or ApexSQL Script. Feel free to download them and work along with the article The following ApexSQL tools are required for the following example: ApexSQL Build, ApexSQL Diff, ApexSQL Source Control, and ApexSQL Script. ![]() In addition to this, the solution should provide a possibility for the user to create a SQL script from a source control label (to create or modify a database) and save it for later execution or modification. Build a new database, from a label, or update an existing database.Apply a source control label from the repository to the database.Compare and synchronize a source control label with the current state in the repository.Compare and synchronize a source control label with a database, database backup, or a local folder that contains SQL scripts and synchronize any of these with the selected label.Get the latest source control label (or any other version) from the repository.Create a source control label by taking a snapshot of the current state of the repository.The source control label solution should provide a possibility to perform the following operations:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |