Sunday, June 24, 2018

Here are detail steps to copy personalization from one instance to other instances using the XMLImporter/XMLExporter tool



1. Get Document Name.

Go to the page you want to copy the personalization from and click the "about this Page" link at the bottom of the page. You will see the page name with full path which starts with /oracle/apps/<prod>.
2. Get the Personalization Document info

Run the following command at SQLPlus as APPS user     

SQL> set serveroutput on
SQL> exec jdr_utils.listCustomizations('<full document name from step 1>')

1.  If there are multiple records returned by this command, you will need to use export/import each item individually that you wish to export. 

2.  You may also find there are records returned for seeded personalizations provided by Oracle which do not need to be exported
3. Use XMLExporter to export personalization document

java oracle.jrad.tools.xml.exporter.XMLExporter <personalization document from step #2>  \
-username "<username>" -password "<password>"  \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port)))(connect_data=(sid=<sid>)))" \
-rootdir "<output directory>"
4. Use XMLImporter to import personalization document

java oracle.jrad.tools.xml.importer.XMLImporter \
<full path of the file you want to import> \
-username "<username>" -password "<password>"  \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port>)))(connect_data=(sid=<sid>)))" -rootdir "<top level directory>" \
-rootPackage "/oracle/apps/<prod>"


If you are importing files exported from step #3, then the rootdir in step #4 will be same as in step #3
Example
Here is a step-by-step guide showing how to use XMLImporter/XMLExporter to transfer a SITE level personalization for the PreferencesPG page ($FND_TOP/mds/preferences/webui/PreferencesPG.xml)

1. List the personalization document to be exported

SQL> set serveroutput on
SQL> exec jdr_utils.listcustomizations('/oracle/apps/fnd/preferences/webui/PreferencesPG');

Returns:
/oracle/apps/fnd/preferences/webui/customizations/site/0/PreferencesPG
2. Export the above personalization file to /tmp/mytest from the DEV instance

Before exporting, check the directory /tmp/mytest is valid and writable.
java oracle.jrad.tools.xml.exporter.XMLExporter \/oracle/apps/fnd/preferences/webui/customizations/site/0/PreferencesPG \-username apps -password appsdevpass \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=myhost)(port=1523)))(connect_data=(sid=DEV)))" \
-rootdir "/tmp/mytest"
OR

java oracle.jrad.tools.xml.exporter.XMLExporter -rootdir "/tmp/mytest" /oracle/apps/fnd/preferences/webui/customizations/site/0/PreferencesPG -username apps -password appsdevpass  -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =myhost)(port = 1523)))(connect_data = (sid = DEV)))";


3. Import the above exported file into the UAT instance:

java oracle.jrad.tools.xml.importer.XMLImporter \ /tmp/mytest/oracle/apps/fnd/preferences/webui/customizations/site/0/PreferencesPG.xml \
-username apps -password appsuatpass \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=myhost)(port=1522)))(connect_data=(sid=UAT)))" \
-rootdir "/tmp/mytest" -rootPackage "/oracle/apps/fnd"


NOTE: The use of: -rootPackage reflected above IS AN OPTIONAL parameter.

No comments:

Post a Comment