Oracle SOA 11G MDS used as a shared repository for
managing and reusing shared resources like WSDL, XSD, DVM, XREF,
FAULT-POLICIES and CONSTANTS across applications.
Here below are the WLST commands to import , export and delete contents from MDS
1. Execute wlst.cmd :
cd ${ORACLE_HOME}/oracle_common/common/bin
Execute wlst.sh file:
----------------------
wlst.cmd
2. Connect to WL Server :
connect('weblogic','welcome1','t3://localhost:7001')(if you have only adminserver)
connect('weblogic','welcome1','t3://localhost:8001') (if you have managed server)
3. Import Contents to MDS :
Import all files and folder :
-----------------------------
importMetadata(application='soa-infra',server='soa_server1',
fromLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',docs='/apps/**')
Import files under specified directory to MDS:
----------------------------------------------
importMetadata(application='soa-infra',server='soa_server1',
fromLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',docs='/apps/DVM/**')
importMetadata(application='soa-infra',server='soa_server1',
fromLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',docs='/apps/XREF/**')
Import specific file to MDS:
---------------------------------
importMetadata(application='soa-infra',server='soa_server1',
fromLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',
docs='/apps/util/DVM/samplecountry.dvm')
4. Export Contents from MDS :
Export all files and folders from MDS:
--------------------------------------
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed', docs='/**')
Export all files and folders inside "/apps" folder :
----------------------------------------------------
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed', docs='/apps/**')
Export specific folder :
-----------------------
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',
docs='/apps/util/fault-policies/**')
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed', docs='/apps/util/DVM/**')
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed', docs='/apps/util/XREF/**')
Export specific file:
---------------------
exportMetadata(application='soa-infra', server='soa_server1',
toLocation='C:/Oracle/Middleware1/jdeveloper/integration/seed',
docs='/apps/util/DVM/samplecountry.dvm')
5. Delete Contents from MDS :
Delete all files:
-----------------------------
deleteMetadata(application='soa-infra',server='soa_server1',docs='/apps/')
Delete files under specific folder:
-----------------------------------
deleteMetadata(application='soa-infra',server='soa_server1',
docs='/apps/util/DVM')
Delete specific file:
---------------------
deleteMetadata(application='soa-infra',server='soa_server1',
docs='/apps/util/DVM/samplecountry.dvm')
5. Delete Folder from MDS :
1. Go to ${ORACLE_HOME}/Oracle_SOA1/common/bin
2. Execute wlst.sh file.
3. wls:/offline>connect('weblogic','welcome1','t3://localhost:7011')
4. wls:/SOA-domain/serverConfig> sca_removeSharedData('http://localhost:8011',
'DVM')
Example: sca_removeSharedData('http://<ManagerServerHost>:<ManagedServerPort>',
'DVM')
Just mention the any folder name inside root folder "/apps", that folder
and files inside that folder will be deleted.
You can use asterisk(*) to specify more than one files e.g. to delete all files with names starting with Gen use
deleteMetadata(application='soa-infra',server='soa_server1',docs='/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/Gen*.wsdl')
Exception:
You may get the following exception
MDS-91002: MDS Application runtime MBean for "soa-infra" is not available. "deleteMetadata" operation failure.
Solution:
- Verify that your soa-infra is up and running and is on the correct server (Admin, soa_server1) as specified in the deleteMetadata() command
-
Verify that you've not fired the command to connect to other managed
server during the steps to delete the file. If you connected firstly to
SOA server, then to Admin Server and now you try to fire
deleteMetadata(), it will give above error. Hence start again.
By
Deepthi reddy
No comments:
Post a Comment