Thursday, March 14, 2013

Bulk Importing Metadata Services (MDS) Files With WLST or EM Leaves Out Configuration Files

Applies to:

Oracle SOA Platform - Version: 11.1.1.5.0 and later [Release: 11gR1 and later ]

Information in this document applies to any platform.

Symptoms

For different use cases you might be facing the situation where you want to bulk import Metadata Service (MDS) files into an environment. This may be to update many files at once or to restore the MDS from another db.



Both the Weblogic Scripting Tool (WLST) and Enterprise Manager (EM) present means to do that.

In WLST you use the importMetadata function where you declare parameter docs='/**' to tell you want all files.

In EM you use the MDS import tool and select a zip file or expanded directory.



In both cases the files will be imported except for the following configuration files:

/soa/configuration/default/adapter-config.xml

/soa/configuration/default/b2b-config.xml

/soa/configuration/default/bpel-config.xml

/soa/configuration/default/bpmn-config.xml

/soa/configuration/default/businessrules-config.xml

/soa/configuration/default/cep-config.xml

/soa/configuration/default/edn-config.xml

/soa/configuration/default/mediator-config.xml

/soa/configuration/default/soa-infra-config.xml

/soa/configuration/default/workflow-config.xml

/soa/configuration/default/workflow-identity-config.xml

/soa/configuration/default/workflow-notification-config.xml

/soa/configuration/folders.xml

/soa/configuration/logmetadata.xml

Cause

This functionality is working by design and has been added to avoid overwriting configuration by mistake.

Thus you will have to import the files one by one instead.

Solution

This section describes the two methodologies (Using WLST, or Enterprose Manager) below:

Using WLST

1. Change to common/bin directory for oracle_common

cmd> pwd

$Middleware/PS4/oracle_common/common/bin





2. Run wlst

cmd> ./wlst.sh





3. Connect to the soa-infra application running on selected server

wls:/offline> connect()

Please enter your username :weblogic

Please enter your password :welcome1



Please enter your server URL [t3://localhost:7001] :

Connecting to t3://localhost:7001 with userid weblogic ...

Successfully connected to Admin Server 'AdminServer' that belongs to domain 'soa_domain'.



Warning: An insecure protocol was used to connect to the

server. To ensure on-the-wire security, the SSL port or

Admin port should be used instead.





4. Bulk export metadata

wls:/soa_domain/serverConfig> exportMetadata(application='soa-infra', server='soa_server1', toLocation='/tmp/SOA-MDS', docs='/**');



Executing operation: exportMetadata.



Operation "exportMetadata" completed. Summary of "exportMetadata" operation is:

List of documents successfully transferred:

....

/soa/configuration/default/adapter-config.xml

/soa/configuration/default/b2b-config.xml

/soa/configuration/default/bpel-config.xml

/soa/configuration/default/bpmn-config.xml

/soa/configuration/default/businessrules-config.xml

/soa/configuration/default/cep-config.xml

/soa/configuration/default/edn-config.xml

/soa/configuration/default/mediator-config.xml

/soa/configuration/default/soa-infra-config.xml

/soa/configuration/default/workflow-config.xml

/soa/configuration/default/workflow-identity-config.xml

/soa/configuration/default/workflow-notification-config.xml

/soa/configuration/folders.xml

/soa/configuration/logmetadata.xml

...



3,611 documents successfully transferred.



Observe the amount of exported files, 3611





5. Bulk import files

wls:/soa_domain/serverConfig> importMetadata(application='soa-infra', server='soa_server1', fromLocation='/tmp/SOA-MDS', docs='/**'')



Executing operation: importMetadata.



Operation "importMetadata" completed. Summary of "importMetadata" operation is:

List of documents successfully transferred:



...





1 documents successfully transferred.

3,597 documents successfully transferred.





6. Import file bpel.xml

wls:/soa_domain/serverConfig> importMetadata(application='soa-infra', server='soa_server1', fromLocation='/tmp/SOA-MDS', docs='/soa/configuration/default/bpel-config.xml')



Executing operation: importMetadata.



Operation "importMetadata" completed. Summary of "importMetadata" operation is:

List of documents successfully transferred:



/soa/configuration/default/bpel-config.xml



1 documents successfully transferred.





7. Repeat step 6 for all the configuration files



MDS functions from EM

SOA Enterprise Manager provides a tool to facilitate the export of the MDS schema to disk.



To accomplish this please follow these steps:

1. Log in to EM http://host:port/em

2. Expand SOA and right-click on soa-infra -> Administration -> MDS Configuration

3. Under Export section select one of the suitable alternatives, server disk for example:

Select /tmp/SOA_MDS

4. Redirect the database and restart ther soa server with a fresh new RCU schemas

5. From EM, expand SOA and right-click on soa-infra -> Administration -> MDS Configuration

6. Under import section select one of the suitable alternatives, e.g. from server disk '/tmp/SOA_MDS'

7. Import each of the configuration files one by one following

Exporting and Importing SOA Composites and Configuration Files from a SOA MetaData Store (MDS) (Doc ID 1335908.1)

References

BUG:13850577 - MDS IMPORT FROM EM DOES NOT IMPORT ALL FILES





1 comment:

  1. Refer https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=13369713696994&id=1380835.1&_afrWindowMode=0&_adf.ctrl-state=o9gdkk5vd_256

    ReplyDelete