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.
...
- SQL Parser only applies to changes that are:
- Packaged using the DIRECT, DDL_DIRECT, or SQLFILE method
- Created in the ChangeSet Wizard as 'Execute a SQL script file using JDBC'/'Custom SQL (External File)'. NOTE: Changes created as 'Custom SQL' will NOT be processed by SQL Parser.
- Created in the ChangeSet Wizard as 'Execute with SQLPlus'
- SQL Parser does not change how these scripts are ultimately executed during a Deploy operation. The following package methods all result in execution of a SQL script:
- DIRECT packaging method
- DDL_DIRECT packaging method
- SQLFILE packaging method
- changes created as 'Execute a SQL script file using JDBC'/'Custom SQL (External File)'
- changes created as 'Execute with SQLPlus'
- SQL Parser does not validate SQL statements. Instead, SQL Parser simply parses provided SQL scripts and models them into Datical's object model for subsequent validation with rules and forecast.
- In the event the SQL Parser is unable to parse a statement that is included in a provided SQL script:
- The Forecast Report will include a warning for the statement(s) that cannot be parsed. The warning will read: "WARNING - Will not be forecast"
- SQL Parser will continue parsing the provided SQL script and attempt to parse all other statements
- In the event the SQL Parser is unable to parse the provided SQL script file or otherwise encounters an error:
- The Forecast Report will include a warning that will read: `SQL Parser could not parse sql script file <script>`
- In the event the SQL Parser is unable to parse a statement that is included in a provided SQL script:
- We recommend that you do not put large DML scripts with many insert or update statements in folders that have SQL Parser enabled.
...
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 directoryor 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.
...
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:
- For fixed folders, the
ddl_direct,
sql_direct
folder or the,
orsql
folder - For flexible folders, the highest directory that has the
packageMethod=DDL_DIRECT,
packageMethod=DIRECT, or packageMethod=SQLFILE
setSQLFILE
Follow this procedure after you encounter the Forecast failure and identify the script causing the problem:
- Go to the directory that contains the script that causes the problem (such as the
ddl_direct,
sql_direct
or,
orsql
folder folder). - Set
disableSqlParser=true
in themetadata.properties
file (create the file if it does not exist). Check it in. - Run Deployment Packager again.
- Check that the file is packaged successfully.
- Set
disableSqlParser=false
in themetadata.properties
file. Check it in.
...