Versions Compared

Key

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

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:

OrderSQLFileTypepackageMethod
1ddlCONVERT
2ddl_directDDL_DIRECT
3viewSTOREDLOGIC
34ssisSSIS
45ssis_project

SSIS

56functionSTOREDLOGIC
67procedureSTOREDLOGIC
78packageSTOREDLOGIC
89packagebodySTOREDLOGIC
910triggerSTOREDLOGIC
1011sqlSQLFILE
1112sqlplusDIRECT
1213sql_directDIRECT
1314data_dmlDATA_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

...

SQLFileTypeResources folder
DDLN/A
DDL_DIRECTddl_direct
VIEWview
SSISssis
SSIS_PROJECTssis_project
FUNCTIONfunction
PROCEDUREprocedure
PACKAGEpackage
PACKAGEBODYpackagebody
TRIGGERtrigger
SQLsql
SQLPLUSsql
SQL_DIRECTsql
DATA_DMLdata_dml

...

  • CONVERT (convert)
  • STOREDLOGIC (native)
  • DIRECT (native)
  • DDL_DIRECT (native)
  • DATA_DML (native)
  • SQLFILE (native)
  • SSIS (native)

...

Fixed FolderRerunnable default setting
ddlfalse
ddl_directfalse
data_dmlfalse
sql_direct

false

sqlfalse
sqlplusfalse
proceduretrue
packagetrue
packagebodytrue
functiontrue
triggertrue
viewtrue

...

SQL Server Database Objects and Packaging

Fixed Folder Names

How To: Choose Between CONVERT (ddl) and DDL_DIRECT (sqlddl_direct) Packaging Methods

What is the difference between "ddl" and "sql_direct" folders?