Table of Contents |
---|
This feature is available in version 5.0 and later.
...
When you use flexible folders, the folders containing SQL code must have a metadata.properties file, even if it is blank.
...
Packaging is done in the following order, using the SQLFileType returned from parsing. It is the same order used with static-name directories. (Note that ddl_direct is available in 7.15 and higher.)
The following table shows the packageMethod used for each SQLFileType. :
Order | SQLFileType | packageMethod |
---|---|---|
1 | ddl | CONVERT |
2 | ddl_direct | DDL_DIRECT |
3 | view | STOREDLOGIC |
34 | ssis | SSIS |
45 | ssis_project | SSIS |
56 | function | STOREDLOGIC |
67 | procedure | STOREDLOGIC |
78 | package | STOREDLOGIC |
89 | packagebody | STOREDLOGIC |
910 | trigger | STOREDLOGIC |
1011 | sql | SQLFILE |
1112 | sqlplus | DIRECT |
1213 | sql_direct | DIRECT |
1314 | data_dml | DATA_DML |
Complex and Interdependent Database Changes
Normally DDL changes DDL changes are placed in folders that use the CONVERT packaging method. HoweverHowever, when you need to package complex and interdependent changes, place them in a folder that uses the DDL_DIRECT or DIRECT packaging method instead.
If the order that the multiple statements are listed in the single script is critical to the success of the script, then use the DDL_DIRECT or DIRECT packaging method. The DDL_DIRECT or DIRECT packaging method will preserve the order of the statements in the script. (The CONVERT packaging method may not preserve the order because it creates the change sets by doing a diff of before and after snapshots, and that comparison process does not know the original order of the statements.)
Examples of sets of statements in a single sql script that need to use the DIRECT packaging or DDL_DIRECTpackaging method:
Code Block |
---|
create table move data from old table to new table drop old table |
...
SQLFileType | Resources folder |
---|---|
DDL | N/A |
DDL_DIRECT | ddl_direct |
VIEW | view |
SSIS | ssis |
SSIS_PROJECT | ssis_project |
FUNCTION | function |
PROCEDURE | procedure |
PACKAGE | package |
PACKAGEBODY | packagebody |
TRIGGER | trigger |
SQL | sql |
SQLPLUS | sql |
SQL_DIRECT | sql |
DATA_DML | data_dml |
...
- CONVERT (convert)
- STOREDLOGIC (native)
- DIRECT (native)
- DDL_DIRECT (native)
- DATA_DML (native)
- SQLFILE (native)
- SSIS (native)
...
Fixed Folder | Rerunnable default setting |
---|---|
ddl | false |
ddl_direct | false |
data_dml | false |
sql_direct | false |
sql | false |
sqlplus | false |
procedure | true |
package | true |
packagebody | true |
function | true |
trigger | true |
view | true |
...
SQL Server Database Objects and Packaging
How To: Choose Between CONVERT (ddl) and DDL_DIRECT (sqlddl_direct) Packaging Methods
What is the difference between "ddl" and "sql_direct" folders?