Oracle Applications HOWTO: copy personalization

Go to Michael Dvorkin's user page

Prerequisites
E-Business Suite 11.5.10

Steps to copy personalization
1. Find the name of the page having required personalization

Click the "about this page" link at the bottom of the page Copy the full page name (including path)

2. For every page - find a list of customizations

sqlplus apps/ set lines 300 set serveroutput on  exec dbms_output.enable(1000000); exec jdr_utils.listCustomizations(' '); exit;

3. Download customizations found in the previous step

The following should be done for every customization:

java oracle.jrad.tools.xml.exporter.XMLExporter " " -username "apps" -password -dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host= port= )))(connect_data=(sid=)))" -rootdir.

- source database host - source database port  - source database SID

This will create a file .xml in current directory

4. Upload customizations to other environment

The following should be done for every customization downloaded in previous step:

java oracle.jrad.tools.xml.importer.XMLImporter .xml -username "apps" -password -dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host= )(port= )))(connect_data=(sid=)))" -rootdir. -rootPackage

- target database host - target database port  - target database SID

Sample script
Note that this script is for testing purposes only and cannot be used in production.

START OF THE SCRIPT export INFILE="page_names.txt" export TMPINFILE=/tmp/${INFILE}.tmp export FROM_APPSPWD=apps export FROM_SID=DEV export FROM_HOST=`hostname` export FROM_PORT=1521 export TO_APPSPWD=apps export TO_SID=TST export TO_HOST=`hostname` export TO_PORT=1531 export ROOT_DIR=. for name in `cat ${INFILE} | grep -v ^$` do
 * 1) !/bin/ksh
 * 2) File page_names.txt must exist in current directory and must have a list of page names having required personalizations
 * 3) (See step 1)
 * 1) (See step 1)
 * 1) The following section contains definitions that should be changed according to specific environment settings
 * 1) The following section contains definitions that should be changed according to specific environment settings
 * sqlplus apps/${FROM_APPSPWD} << XXX
 * set lines 300
 * set serveroutput on
 * exec dbms_output.enable(1000000);
 * spool $TMPINFILE
 * exec jdr_utils.listCustomizations('$name');
 * spool off
 * exit;

XXX
 * for new_name in `cat $TMPINFILE | grep -v ^$ | grep '^/'`
 * do


 * echo "Copying $new_name"


 * java oracle.jrad.tools.xml.exporter.XMLExporter "$new_name" -username "apps" -password $FROM_APPSPWD -dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host=${FROM_HOST})(port=${FROM_PORT})))(connect_data=(sid=${FROM_SID})))" -rootdir $ROOT_DIR


 * java oracle.jrad.tools.xml.importer.XMLImporter "${ROOT_DIR}/${new_name}.xml" -username "apps" -password $TO_APPSPWD -dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host=${TO_HOST})(port=${TO_PORT})))(connect_data=(sid=${TO_SID})))" -rootdir $ROOT_DIR -rootPackage "$name"


 * done

done exit 0 END OF THE SCRIPT

Known Issues
1. Symptom : Cannot execute java Cause  : java executable is not in the PATH Solution: Add a path to java to the PATH variable, for example: export PATH=${PATH}:/opt/java1.3/bin

Go to Michael Dvorkin's user page