Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Representation in Project File

...

  • Each SQL script is required to identify the database it is working on. You can provide the database names using these methods:
    • USE DATABASE statement for packaging scripts in ddl and ddl, ddl_direct, and sql_direct folders (or for creating "Execute with sqlcmd for Microsoft SQL Server and Azure SQL databases" change sets in the GUI Change Set Wizard)
    • With deploy packager you could create a metadata.properties file that specifies schemaName as <databaseName>.<schema>
  • Object references in a SQL script must be unambiguous. 
    • Use fully qualified object references: <schema>.<object>
    • Do not use unqualified object references:  <object>. 
    • External (cross-database) object references must be fully specified: <databaseName>.<schema>.<object>

...

Provide values for configuration options before packaging SQL scripts.  SQL scripts are organized in folders per object type.

Multi-database/multi-catalog configuration allows you to put the SQL scripts for all of the databases in this project into the same SQL repository in source code.  However, you will still need a REF DB for each database.

See these pages for more information:

...

During packaging, the database specified is used to add a USE <databasename> statement to the SQL files being packaged. 

Operations

Use the Datical DB CLI for managing the project and performing operations

  • package (including backup, snapshot, and compare)
  • status
  • forecast
  • deploy
  • rollback

...

<schemas name="${BDM_SMT_INV}.AppData"/>
<schemas name="${BDM_SMT_INV}.AppObject"/>
<schemas name="${BDM_SMT_INV_EU}.AppData"/>
<schemas name="${BDM_SMT_INV_EU}.AppObject"/>
<schemas name="${BDM_SMT_INV_GB}.AppData"/>
<schemas name="${BDM_SMT_INV_GB}.AppObject"/>
<schemas name="${BDM_SMT_INV_ISMEA}.AppData"/>
<schemas name="${BDM_SMT_INV_ISMEA}.AppObject"/>
<schemas name="${BDM_SMT_INV_APAC}.AppData"/>
<schemas name="${BDM_SMT_INV_APAC}.AppObject"/>

Here is an example of how the properties would look in the changelog.xml file:

<!-- DEV -->
<property appdba:substitutionMode="none" appdba:target="" context="DEV" labels="" name="BDM_SMT_INV" value="BDM_SMT_INV_DEV"/>
<property appdba:substitutionMode="none" appdba:target="" context="DEV" labels="" name="BDM_SMT_INV_EU" value="BDM_SMT_INV_EU_DEV"/>
<property appdba:substitutionMode="none" appdba:target="" context="DEV" labels="" name="BDM_SMT_INV_GB" value="BDM_SMT_INV_GB_DEV"/>
<property appdba:substitutionMode="none" appdba:target="" context="DEV" labels="" name="BDM_SMT_INV_ISMEA" value="BDM_SMT_INV_ISMEA_DEV"/>
<property appdba:substitutionMode="none" appdba:target="" context="DEV" labels="" name="BDM_SMT_INV_APAC" value="BDM_SMT_INV_APAC_DEV"/>
<!-- QA2 -->
<property appdba:substitutionMode="none" appdba:target="" context="QA2" labels="" name="BDM_SMT_INV" value="BDM_SMT_INV_QA2"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA2" labels="" name="BDM_SMT_INV_EU" value="BDM_SMT_INV_EU_QA2"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA2" labels="" name="BDM_SMT_INV_GB" value="BDM_SMT_INV_GB_QA2"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA2" labels="" name="BDM_SMT_INV_ISMEA" value="BDM_SMT_INV_ISMEA_QA2"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA2" labels="" name="BDM_SMT_INV_APAC" value="BDM_SMT_INV_APAC_QA2"/>
<!-- QA1 -->
<property appdba:substitutionMode="none" appdba:target="" context="QA1" labels="" name="BDM_SMT_INV" value="BDM_SMT_INV_QA1"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA1" labels="" name="BDM_SMT_INV_EU" value="BDM_SMT_INV_EU_QA1"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA1" labels="" name="BDM_SMT_INV_GB" value="BDM_SMT_INV_GB_QA1"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA1" labels="" name="BDM_SMT_INV_ISMEA" value="BDM_SMT_INV_ISMEA_QA1"/>
<property appdba:substitutionMode="none" appdba:target="" context="QA1" labels="" name="BDM_SMT_INV_APAC" value="BDM_SMT_INV_APAC_QA1"/>

...