GenerateDDLTask Reference

GenerateDDLTask specifies an action, data and property files, the objects on which the action is performed, and various behavioral attributes.

<DDLGeneratorTask
			action="action"
			targetDirectory="path to the DDL samples directory"
			targetFilePrefix="prefix used for the target file name"
			modelProfiles="all|admin|governance|commonlogging|security"
			dbType="type of the database used" 
			dialect="dialect of the database used" />
			

Parameters

Attribute Type Req? Description
action String Yes Specifies the specific action for which you want to generate scripts. The following actions are available:
  • create - scripts required for creating tables and the related required database objects are created.
  • drop - scripts required to cleanup tables and related required database objects are created.
  • update - scripts to update the database schema created by earlier versions of Administrator.
targetDirectory String Yes Specifies the location where the generated scripts will be stored.

The default location can be set in the /administrator/3.3/scripts/ddl/generate_ddl.xml file

Default: /administrator/3.3/scripts/ddl.

targetFilePrefix String Yes The prefix for the generated script files.

Default: the value used for the action attribute.

dbType String No

The type of the database for which the scripts are generated.

The valid values are:
  • ms-sqlserver2005
  • ms-sqlserver2008
  • oracle9i
  • oracle10g
  • db2
dialect String No Applicable to the add action, and only if the overwrite flag was used and is true.
  • com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.SQLServerDialect
  • com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.Oracle9Dialect
  • com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.Oracle10gDialect
  • com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.DB2Dialect

Default: true.

username String No Used to connect to the database.

Required only when using the update action.

password String No Used to connect to the database. Required only when using the update action.

The password can be either clear text or encrypted.

dburl String No. The location of the database.
modelProfiles String No

Used to choose the model for which to generate the scripts. Multiple values can be used using a comma separator. A value of all indicates that scripts for all models should be generated.

Valid values are:
  • admin
  • governance
  • commonlogging
  • security
  • all

Default: all.

Example: Create action

<DDLGeneratorTask
			action="create"
			targetDirectory="${admin.ddl.samples.directory}"
			targetFilePrefix="create"
			modelProfiles="all"
			dbType="ms-sqlserver2008" 
			dialect="com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.SQLServerDialect" />		
		

Example: Update action

<DDLGeneratorTask
			action="update"
			targetDirectory="${admin.ddl.samples.directory}"
			targetFilePrefix="update"
			modelProfiles="all"
			dbType="ms-sqlserver2008" 
			dialect="com.tibco.amf.sharedresource.runtime.core.hibernate.dialects.SQLServerDialect" />		
   username="temp_non_dba_usr"
   password="non_dba_password"
   dbUrl="jdbc:sqlserver://qa_machine:1068;DatabaseName=demo_db"