Thursday, 29 May 2008

XDOLoader Part 1 - XML Publisher DOWNLOAD mode syntax

It surprises me how few people are aware of the generic loader (XDOLoader) for XML / BI Publisher (BIP) files.

Like FNDLOAD for AOL / XML Publisher metadata and WFLOAD for Workflow Item Types, XDOLoader is is a command line utility that allows you to migrate the BIP files between environments. The following BIP file types can be upload and downloaded:

- TEMPLATE
- XML_SCHEMA
- XML_SAMPLE
- DATA TEMPLATE

Call XDOLoader in DOWNLOAD mode to create a local copy of the relevant object.
Call XDOLoader in UPLOAD mode to load your local definitions into the database.

Here's the DOWNLOAD syntax and some examples for Oracle E-Business suite users:

DOWNLOAD MODE SYNTAX:

% java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME \
-DB_PASSWORD \
-JDBC_CONNECTION \
-LOB_TYPE \
-APPS_SHORT_NAME \
-LOB_CODE \
-LANGUAGE \
-TERRITORY \
-LOG_FILE \
-DEBUG

KEY (for E-Business suite Users):

-DB_USERNAME: apps username for the target instance
-DB_PASSWORD: apps password for the target instance
-JDBC_CONNECTION: JDBC connection string (e.g. server:port:sid)
of the target instance
-LOB_TYPE: The XML Publisher object type.
One of 'TEMPLATE', 'XML_SCHEMA', 'XML_SAMPLE' or 'DATA TEMPLATE'
-APPS_SHORT_NAME: Application short name used to register the XML Publisher object
-LOB_CODE: Template code i.e. concurrent program short name
-LANGUAGE: ISO language code(i.e. en) used when registering the object
-TERRITORY: ISO language code(i.e. GB) used when registering the object
-LOG_FILE: Name of the log file. The default filename is xdotmpl.log
-DEBUG: Run in Debug mode. Valid values are 'true' or 'false'


DOWNLOAD MODE EXAMPLES:

This is the simple shell script that I use to download 'GB English' presentation and data templates.
(Note - Change your language and territory as appropriate):

-----------------------------------------
# Get parameters
apps_psw=$1
jdbc_con=$2
app_short_name=$3
lob_code=$4

# Download XML Publisher Template RTF and XSL
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD $apps_psw \
-JDBC_CONNECTION $jdbc_con \
-LOB_TYPE TEMPLATE \
-APPS_SHORT_NAME $app_short_name \
-LOB_CODE $lob_code \
-LANGUAGE en \
-TERRITORY GB \
-LOG_FILE xdotmpl.log \
-DEBUG true

# Download XML Publisher dataTemplate
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD $apps_psw \
-JDBC_CONNECTION $jdbc_con \
-LOB_TYPE DATA_TEMPLATE \
-APPS_SHORT_NAME $app_short_name \
-LOB_CODE $lob_code \
-LANGUAGE en \
-TERRITORY GB \
-LOG_FILE xdotmpl.log \
-DEBUG true

-----------------------------------------

ADDITIONAL NOTES:

1) Don't forget to download your XML Publisher metadata using the FNDLOAD utility. The control file name is xdotmpl.lct.

More on the UPLOAD syntax tomorrow!

5 comments:

--- said...

thanks

Vincent said...

Cool post! But do you know what happened to XDOLoader in BI Publisher? It looks like it has been removed.

Chana said...

Good for people to know.

golden sky said...

Can we download an XLS template also

homeopathy eczema said...
This comment has been removed by a blog administrator.