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 Type | Packaging Folder | Archived? | Notes |
---|---|---|---|
CREATE/ALTER/DROP DATABASE LINK | /sql_direct | Yes | |
CREATE/ALTER/DROP FUNCTION | /function | No | |
CREATE/ALTER/DROP INDEX | /ddl /ddl_direct /sql_direct | Yes | |
CREATE/ALTER/DROP PROCEDURE | /procedure | No | |
CREATE/ALTER/DROP QUEUE | /sql_direct | Yes | |
CREATE/ALTER/DROP SEQUENCE | /ddl /ddl_direct /sql_direct | Yes | |
CREATE/ALTER/DROP SYNONYM | /ddl /ddl_direct /sql_direct | Yes | |
CREATE/ALTER/DROP TABLE | /ddl /ddl_direct /sql_direct | Yes | |
CREATE/ALTER/DROP TRIGGER | /trigger | No | |
CREATE/ALTER/DROP TYPE | /sql_direct | Yes | |
CREATE/ALTER/DROP VIEW | /view | No | |
CREATE/ALTER/DROP VIEW INDEX | /ddl /ddl_direct /sql_direct | Yes | |
RENAME <DB_OBJECT> | /sql_direct | Yes |
Operation | Packaging Folder | Archived? | Notes |
---|---|---|---|
INSERT, UPDATE, DELETE, SELECT | /data_dml | Yes | |
GRANT, REVOKE | /sql_direct | Yes |
Copyright © Datical 2012-2020 - Proprietary and Confidential