Applies to
ApexSQL Source Control
Summary
This article gives an overview of additional database objects (called framework objects) that ApexSQL Source Control creates on initial database linking to a source control repository
Description
Dedicated development model
When linking a database using the dedicated development model, the following objects will be created:
It serves for storing all information about any changes made against the version controlled database objects. When any DDL change occurs in a database, the add-in will write the information in this table including when/who made a change, against what object, and a T-SQL statement executed prior to the change.
Quick tip: The abovementioned table and database DDL trigger will be created in each database that is being linked using the dedicated model. This applies to all supported SQL Server versions. |
Quick tip: Minimum permissions required for the user against a linked database in order to use the add-in in the dedicated model are: ALTER ANY DATABASE DDL TRIGGER, SELECT, INSERT, EXECUTE, UPDATE, CONNECT, CREATE TABLE, ALTER permission against dbo schema. |
Shared development model
When linking a database using the shared development model, a separate database needs to be used for storing the following objects:
Quick tip: If the SQL Server version is older than 2012 (2008, 2008R2, 2005), instead of a server level DDL trigger, a separate database DDL trigger is created in each linked database. |
Quick tip: Please be careful when removing framework objects. For the shared development model especially, if someone else linked any other database from the same server, it is strongly recommended not to delete them. |
/*DEDICATED DEVELOPMENT MODEL Instead of linked_db, specify a name of a database linked using the dedicated model*/ USE linked_db GO /*for Azure SQL database execute just the following lines without the USE statement*/ DROP TRIGGER ApexSQL_SourceControl_DDLTrigger ON DATABASE; DROP TABLE ApexSQL_SourceControl_DatabaseLog; /*SHARED DEVELOPMENT MODEL 1.DROPPING DDL trigger 1.1 If the version of SQL Server is: 2005, 2008 or 2008R2 Instead of linked_db, specify a name of a database linked using the shared model*/ USE linked_db GO /*for Azure SQL database execute just the following lines without the USE statement*/ DROP TRIGGER ApexSQL_SourceControl_DDLTrigger ON DATABASE; GO /* 1.2 If the version of SQL Server is: 2012, 2014, 2016, vNext*/ USE master GO DROP TRIGGER ApexSQL_SourceControl_DDLTrigger ON ALL SERVER; GO /*2. DROPPING other framework objects Instead of ApexSQL, specify a name of a database used to host additional objects (aka framework objects) created by ApexSQL Source Control. Leave ApexSQL database name if that one is used */ USE ApexSQL GO IF OBJECT_ID('UpdateExcludedObjects') IS NOT NULL DROP PROCEDURE ApexSQL_SourceControl.UpdateExcludedObjects; IF OBJECT_ID('UpdateObjects') IS NOT NULL DROP PROCEDURE ApexSQL_SourceControl.UpdateObjects; IF OBJECT_ID('ChangeLog') IS NOT NULL DROP TABLE ApexSQL_SourceControl.ChangeLog; IF OBJECT_ID('ExcludedObjects') IS NOT NULL DROP TABLE ApexSQL_SourceControl.ExcludedObjects; IF OBJECT_ID('Objects') IS NOT NULL DROP TABLE ApexSQL_SourceControl.Objects; IF OBJECT_ID('Policies') IS NOT NULL DROP TABLE ApexSQL_SourceControl.Policies; IF OBJECT_ID('UserMappings') IS NOT NULL DROP TABLE ApexSQL_SourceControl.UserMappings; /* When using Azure SQL database only DROP statements should be used */ DROP PROCEDURE ApexSQL_SourceControl.UpdateExcludedObjects; DROP PROCEDURE ApexSQL_SourceControl.UpdateObjects; DROP TABLE ApexSQL_SourceControl.ChangeLog; DROP TABLE ApexSQL_SourceControl.ExcludedObjects; DROP TABLE ApexSQL_SourceControl.Objects; DROP TABLE ApexSQL_SourceControl.Policies; DROP TABLE ApexSQL_SourceControl.UserMappings;
Quick tip: In case you want to delete the entire database that keeps the framework objects, be careful that it is a database dedicated just for framework objects and that it does not contain any other information. |
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Termini di utilizzo Privacy Cookie Preference Center