Oracle E Business Suite provides utilities like FNDLOAD,WFLOAD to migrate Application Objects from one instance to another.Similarly it provides XDF utility to migrate Database Objects.
XDF utility is a Java class ,but a wrapped version of the it is available to be executed as Perl script too.Let us take an example to understand the utility in a better manner.Firstly we will create a custom table in a custom schema ,then generate the XDF file ,and finally apply the script to recreate the objects.
1. Table Creation in Custom Schema:
CREATE TABLE XX.XX_XDF_TEST
(EMPNO NUMBER(4,0) NOT NULL ENABLE,
ENAME VARCHAR2(10 BYTE),
JOB VARCHAR2(9 BYTE),
CONSTRAINT XX_XDF_TEST_PK PRIMARY KEY (EMPNO));
COMMENT ON COLUMN XX.XX_XDF_TEST.DEPTNO IS ‘Employee Department Number’;
CREATE INDEX XX.XX_XDF_TEST_N1 ON XX.XX_XDF_TEST (ENAME);
GRANT ALL ON XX.XX_XDF_TEST TO APPS;
CREATE SYNONYM APPS.XX_XDF_TEST FOR XX.XX_XDF_TEST;
2. Execute XDF’s FndXdfGen Java Class in Unix prompt to generate the XDF file of the Custom Table.The command will extract structure of the Table and its dependent objects like Index,Synonym,Constraints,Comments,Synonym and put them in an XDF file.
java oracle.apps.fnd.odf2.FndXdfGen apps_schema=apps apps_pwd= jdbc_protocol=thin jdbc_conn_string=host:port:SID object_name=XX_XDF_TEST xsl_directory=$FND_TOP/patch/115/xdf/xsl owner_app_shortname=XX xdf_filename=/home/user1/XX_XDF_TEST object_type=TABLE logfile=/home/user1/XX_XDF_TEST.log
3. Execute XDF’s FndXdfCmp Class un UNix prompt to create the database objects, here the database object is a Table and its related objects.
java oracle.apps.fnd.odf2.FndXdfCmp apps thin host:host:port:SID TABLE /home/user1/XX_XDF_TEST.xdf $FND_TOP/patch/115/xdf/xsl
Note : XDF utility will create a Select * View of the table under creation in custom schema and then create a synonym of the view in APPS schema.
4. The same objective can be achieved by using Perl script functions, which are nothing but a wrapper on the above Java classes.
Command to Download :
perl $FND_TOP/bin/xdfgen.pl apps/