User Guide: Developer SCM Packaging (SQL Server Addendum)

Note

This information is now maintained in the product documentation: SQL Server Database Objects and Packaging.


SQL Server Guidelines

  • SQL Server database objects should NOT be qualified with the database name. Datical DB will take care of that.
  • For a SQL Server Default Schema (single-schema) Project, database objects can be either fully qualified or unqualified with the schema name. If they are left unqualified, Datical DB will deploy the changes into the default schema for the user (this is dbo, by default).
  • For a SQL Server Multi-Schema Project, database objects must be fully qualified with the schema name so they get deployed to the correct schema during packaging.

SQL Server SCM Packaging Patterns

Datical supports two development usage/packaging patterns:

  • Permanent - In-place editing, packaging and no archiving of database changes so they can be managed similar to application code. This applies to the following object types:
    • Procedures (when scripts are placed in the "/procedure" folder)
    • Functions (when scripts are placed in the "/function" folder)
    • Views (when scripts are placed in the "/view" folder)
    • Triggers (when scripts are placed in the "/trigger" folder)
  • Transient - Database changes are archived after packaging (all other folders).

SQL Server Packaging Folders

Object TypePackaging FolderArchived?Notes
CREATE/ALTER/DROP DATABASE LINK/sql_directYes
CREATE/ALTER/DROP FUNCTION/functionNo
CREATE/ALTER/DROP INDEX/ddl /ddl_direct /sql_directYes
CREATE/ALTER/DROP PROCEDURE/procedureNo
CREATE/ALTER/DROP QUEUE/sql_directYes
CREATE/ALTER/DROP SEQUENCE/ddl /ddl_direct /sql_directYes
CREATE/ALTER/DROP SYNONYM/ddl /ddl_direct /sql_directYes

CREATE/ALTER/DROP TABLE

/ddl /ddl_direct /sql_directYes
CREATE/ALTER/DROP TRIGGER

/trigger

No
CREATE/ALTER/DROP TYPE/sql_directYes
CREATE/ALTER/DROP VIEW

/view

No
CREATE/ALTER/DROP VIEW INDEX/ddl /ddl_direct /sql_directYes
RENAME <DB_OBJECT>/sql_directYes
OperationPackaging FolderArchived?Notes
INSERT, UPDATE, DELETE, SELECT/data_dmlYes
GRANT, REVOKE/sql_directYes

Copyright © Datical 2012-2020 - Proprietary and Confidential