XML Definition File Utilities

Overview

The XML Definition File (XDF) utility is the next generation version of the older Object Definition File (ODF) utility which was used to propagate object definitions.

Note that XDF currently does not support "alters" for nested tables. Only "create" scenarios for nested tables is supported. Beginning with Release 12.1, XDF can capture the nested table information in the XDF file, read this information while propagating the table object, and alter the base table to include this nested table column.

According to Oracle E-Business Suite standards, there cannot be two primary keys on a table both with the primary key type as 'D'. Beginning with Release 12.1, the XDF application will, depending on a specified parameter value, overwrite the old primary key and create a new one in the XDF file.

XDF Generation Utility

The XDF (XML Definition File) Generation Utility is used in extracting schema object definitions into XDF format (.xdf files).

The .xdf extension is to distinguish XML files containing object definitions from other XML files that contain data. The XDF Generation Utility must be run against an Oracle 9iR2 database (v9.2.0.3 or above) or higher, given that it relies on the Metadata API (dbms_metadata) to generate the definitions in XML. The standard location for XDF files is $PROD_TOP/admin/xdf or $PROD_TOP/patch/115/xdf.

The format of the XDF file is such that a primary object along its dependent object(s) are associated together in one file. For example, the definition of a table along with all its indexes, constraints and triggers will be associated together in a single XDF file.

Please refer to the section on XDF file structures based on object types. The XDF Generation Utility is available in Perl() and Java (FndXdfGen). The XDF Generation Perl utility is located in the central tools area under $FND_TOP/bin.

Features

The XDF Generation Utility augments the base definition generated by the Metadata API and has the following features:

Important: Constraints on tables must have user-defined names. They must not have system-generated names.

XDF Generation

XDF Generation Process

the picture is described in the document text

Developers can use SQL to create or alter database objects, and then invoke the XDFGEN utility to produce an object definition file in XML.

The XDF file always contains the complete definition of the primary object and dependent object(s). After the initial generation of the XDF file, any subsequent changes, regardless of whether they are specific only to the primary object and/or dependent object(s), will always result in the complete definition of the primary and dependent object(s) being generated. At present, the metadata API generates only the complete definition and does not support incremental definitions.

Object Containment in XDF

The ADODFGEN utility relied on the concept of building blocks to generate ODF(s). XDF does not support the concept of building blocks and instead groups a primary object along with its dependent objects to allow for a blend of granularity, ease of maintenance, and efficient comparison. The following table provides details on object containment:

Object Containment Details
Primary Object Types Details Dependent Objects Containment in XDF
Tables These include Global temporary tables, index-organized tables or IOTs, queue tables, normal tables, tables with types (for example, VARRAYS and nested tables types, object types, spatial data-types, partitioned tables Indexes, triggers (optional), types, constraints, sequences, policies One Table and its dependent object definitions per XDF
Materialized Views (MVs) on Materialized Views   Indexes, triggers (optional), Materialized view logs One MV and its dependent object definitions per XDF
Materialized Views on Base Tables   Indexes, triggers (optional) One MV and its dependent object definitions per XDF
Materialized View Logs on Base Tables   Indexes, triggers (optional), constraints One MV log and its dependent object definitions per XDF
Views     One view definition per XDF
Advanced Queues     One queue definition per XDF
Triggers Triggers could be generated along with the Table definition or separately.   One or more trigger definition(s) per XDF
ADT (Object or Abstract Datatypes)     One ADT definition per XDF

Usage

The XDF Generation and Comparison utilities are available as Java standalone command-line utilities. They are also available as Perl wrappers, xdfgen.pl and xdfcmp.pl (see usage below) over the Java FndXdfGen and FndXdfCmp utilities, respectively, to improve the ease of use for developers.

Developers can use any Release 12.2 environment to extract latest schema definitions of the database objects in XDF files.

Ensure that the latest generation patch has been applied on your environment and set the required environment variables like $FND_TOP and $CLASSPATH to point to this environment before generating the XDF.

Once the XDF file is generated, you can test the upload of this by invoking xdfcmp.pl usage notes to test your changes.

Perl Wrapper Utilities

The following parameters, while mandatory in the Java utilities, are optional in the Perl wrapper utilities, xdfgen.pland xdfcmp.pl:

Java Wrapper Utilities

The following parameters are now optional in the Java utilities:

JDeveloper Invocation

XDF Generation and Comparison utilities can also be invoked from JDeveloper:

  1. Download Oracle JDeveloper 10g (Version 9.0.5.2, build 1618). This specific version is required for XML Parser compatibility.

  2. Copy XML parser xmlparserv2-904.zip to <jdev-dir>\jdev\lib\patches.

  3. Download XDFGen.jar and XDFCmp.jar to <jdev-dir>\jdev\lib\ext(mouse right-click and use "Save Target As..." link).

  4. Start JDeveloper. Create or open an application workspace and project (an empty project is acceptable as well) and define database connections for the source and target database(s). Select project. The XDF Generation Wizard and XDF Comparison Wizard can be selected from the Tools menu.

XDF Comparison Utility

The XDF (XML Definition File) Comparison Utility (Perl and Java) compares database object definitions contained in the XDF with the actual database object definitions in the target database and then applies the changes to the object in the target database accordingly.

The XDF Comparison Utility can run against database versions 8.1.7 and higher. The XDF Comparison Utility is available in Perl (xdfcmp.pl) and Java (FndXdfCmp). The XDF Comparison Perl Utility is located in the central tools area under $FND_TOP/bin.

Features

The XDF Comparison Utility also contains the following features:

The following are FND/AOL Data Dictionary tables updated by the XDF Comparison Utility:

Supported Objects

The following is a list of database objects supported by XDF.

Usage

The following notes apply to using the XDF Comparison Utility.

XDF Comparison PERL Utility (xdfcmp.pl)

xdfcmp.pl <owner_schema>@<oracle_sid> <xdf_filename>   
[<apps_schema_name>]  
[logfile=<filename>]           
[changedb=<y|n>]  
[deferred=<list>]  
[dropCr=<list>]  
[Data_Sec_Vpd=<y|Y>]  
[Standalone=<y|Y>]          

Enter the password when prompted.

You have the option to enter the password on the command line, but this method may be insecure.

Mandatory arguments:

Optional parameters:

Examples

Here are some examples of xdfcmp.pl usage.

XDF Comparison Java Utility ((FndXdfCmp)

java oracle.apps.fnd.odf2.FndXdfCmp 
<schemaId> 
[<schemaPassword>] 
<appId>
[<appPassword>] 
<jdbc driver type> 
<jdbc tns info> 
<object_type> 
<xdf file name> 
<xsl file directory> 
[deferred=<list> ] 
[dropCr=<list>] 
[logfile=<filename>] 
[Data_Sec_Vpd=<y|Y>] 
[Standalone=<y|Y>] 
[changedb=<y|n>] 

You have the option to enter the passwords on the command line, but this method may be insecure. If you omit the passwords, enter them when prompted.

Note: The CLASSPATH environment variable has to be set with the correct JDK and JDBC versions (at least jdk118 and jdbc111) before running the XDF Comparison program.

Mandatory arguments:

Optional Parameters:

Examples:

Global temporary table - The following command is used to compare a table definition in the XDF file wf_local_users_temp.xdf with the definition in the database db_name and run SQL statements to remove the differences so that the object definition in the database matches the definition in the XDF file.

java oracle.apps.fnd.odf2.FndXdfCmp applsys thin ap123fam:1521:db_name table /home/jdoe/wf_local_users_temp.xdf /fnddev/fnd/11.5/patch/115/xdf/xsl     

Table - The following command is used to compare a table definition in the XDF file jtasyncmap.xdf with the definition in the database db_name and run SQL statements to remove the differences so that the object definition in the database matches the definition in the XDF file. In this example, the index JTA_SYNC_CONTACT_MAPPING_U1 on the table is deferred.

java oracle.apps.fnd.odf2.FndXdfCmp jtf thin ap123fam:1521:db_name table jta_sync_contact_mapping.xdf /fnddev/fnd/11.5/patch/115/xdf/xsl deferred=JTA_SYNC_CONTACT_MAPPING_U1     

Materialized view - The following command is used to compare a materialized view definition in the XDF file bil_bi_opty_t_mv.xdf with the definition in the database db_name and run SQL statements to remove the differences so that the object definition in the database matches the definition in the XDF file.

java oracle.apps.fnd.odf2.FndXdfCmp apps thin ap123fam:1521:db_name mview bil_bi_opty_t_mv.xdf /fnddev/fnd/11.5/patch/115/xdf/xsl     

View - The following command is used to compare a view definition in the XDF file aview.xdf with the definition in the database db_name and run SQL statements to remove the differences so that the object definition in the database matches the definition in the XDF file.

 java oracle.apps.fnd.odf2.FndXdfCmp apps thin ap123fam:1511:db_name view abmbg_act_acct_data_var_v.xdf /fnddev/fnd/11.5/patch/115/xdf/xsl