SQL Parser allows you to benefit from rules and forecast capabilities for Oracle SQL Scripts that are being packaged through the DIRECT, DDL_DIRECT, or SQLFILE package methods.

Currently, the SQL Parser only supports Oracle SQL scripts.

Properties of the SQL Parser

In rare cases, the SQL Parser may incorrectly model a statement found in a provided SQL script, which may lead to erroneous rules and forecast violations (or the erroneous lack thereof). If you encounter such behavior, please contact our Technical Support team so that the matter may be addressed.

Configuring Projects to Use SQL Parser

SQL Parser is a global setting that applies to the entire project. As a global setting, there is no way to selectively enable SQL Parser. Instead, SQL Parser can be selectively disabled for specific folders after the global setting has been enabled. To enable the SQL Parser:

Disabling SQL Parser

You can selectively disable the SQL Parser after it has been enabled, either at the folder level or on the change set level.

At the Folder level

You can disable SQL Parser at the folder level either temporarily or permanently in the metadata.properties file for that folder:

Set disableSqlParser=true in the metadata.properties file for any folders that you do not want SQL Parser to process. 

disableSqlParser=[true | false]

At the Change Set level

You can disable SQL Parser for a specific change set by manually editing the changelog.xml to add disableSqlParser="true":

Add disableSqlParser=true in the appdba:sqlplus section of the change set for a specific change set you do not want SQL Parser to process.

<changeSet appdba:scriptChecksum="9f8a11051d1478faf2752baacb76cf0e" author="J Doe" created="2020-08-10 18:37+0000" datical:origFileName="adding_test_new_001.sql" datical:origFilePath="scripts/sql_direct" datical:version="1" datical:versionStrategy="DEPLOY_ALL" id="20200810183704986_adding_test_new_001" labels="509,deploy-test1,deploy-test1,adding_test_new_001.sql">
    <appdba:sqlplus disableSqlParser="true" enableRollbackOnError="true" path="sql/20200810183704986_adding_test_new_001.sql" removeSpools="First" schemaName="SCHEMA1"/>
    <comment>Test script</comment>

Procedures for SQL Parser to work around Forecast failures

If a Forecast fails for a script, you may be able to temporarily turn off SQL Parser to work around it. Determine which script caused the failure first (Forecast Report).  See which directory the script with the forecast failure is in (such as sql_direct or sql or ddl_direct folder).

To work around the problem, turn off SQL Parser  temporarily using disableSqlParser=true in metadata.properties for the folder where the script failed, and then run deployPackager again.

IMPORTANT: You should reset disableSqlParser=false in metadata.properties after the script is packaged successfully.  

If you have a directory hierarchy for SQL scripts remember that metadata.properties effects the directory it is in and all subdirectories. Set the property in the directory that is most local to the script that causes the packaging error. The directory hierarchy root is as follows:

Follow this procedure after you encounter the Forecast failure and identify the script causing the problem:

  1. Go to the directory that contains the script that causes the problem (such as the ddl_direct, sql_direct, or sql folder). 
  2. Set disableSqlParser=true in the metadata.properties file (create the file if it does not exist).  Check it in. 
  3. Run Deployment Packager again. 
  4. Check that the file is packaged successfully. 
  5. Set disableSqlParser=false in the metadata.properties file. Check it in. 

If the reason for the Forecast failure was that a statement earlier in the script was unable to be forecast and a statement later in the script depended on it, there may be a different work around possibility.  If it is appropriate for this type of script, you may consider splitting the single script into multiple smaller scripts so the statement with the forecast failure is in a separate script from the other statements that depend on it.


If a script is packaged into changesets with parser turned off, the changesets carry that setting forward as they are deployed to later steps in the pipeline. 


See Using the metadata.properties file


Changeset Wizard and SQL Parser

Selectively disabling the SQL Parser using the metadata.properties file will only apply when packaging changes using the Packager. Selectively disabling the SQL Parser is not available with the ChangeSet Wizard.


Additional Files Produced

When SQL parsing is enabled, a file is produced after any of the following operations:

The file contains the modeled changes produced by the SQL Parser. It can be used for debugging. The produced file is stored in the project in the following directory:

Reports/<year>/<date>/<dbdef>/[forecast | deploy]/parser_output/<filename>_<timestamp>.xml

Supported Databases

Using SQL Parser is available only for the following databases. See each section for additional information about object support and limitations. 

Limitations of SQL Parser

Syntax and Modeling Limitations:

SQL Statements Not Modeled

The following statements will not be modeled by the SQL Parser and will instead just be run as provided.  Note that this list is applicable for Datical DB versions 6.15 and higher.  (The list for Datical DB versions 6.14 and lower was somewhat different.)

SQL Statements to Avoid

Do not use SQL Parser with the following statements.