How to deploy mds using Jdeveloper?
One of the new features in Jdeveloper 12c is the ability to transfer mds data directly from the JDeveloper to the server.- Create new local MDS connection in JDeveloper
- File > New > From Gallery > Search for SOA-MDS connection
- Similarly create MDS connection to the remote server that you want to deploy to.
- Now right click on your local file based mds and select Transfer To
- And select the folders, files and your target mds connection.
- Finally click OK
How to deploy mds using ANT?
This is a really simple script to deploy MDS on Oracle SOA suite and it should work on both 11g and 12c SOA suite.
Create both build.properties file and build.xml file in the same folder as your MDS folder.
Folder structure should look as follows:
Project/.
Project/mds
Project/mds/apps/
Project/mds/apps/ApplicationObjectLibrary/
Project/mds/apps/DVM/
Project/build.xml
Project/build.properties
build.properties
#MDS folder in your current directory
mds.repository=mds
#this is the oracle middleware home.
middleware.home=C:/Oracle/Middleware/Oracle_Home
deploy.serverURL=http://localhost:7101
deploy.user=weblogic
deploy.password=welcome1
build.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Deployment Scripts for SOA Suite 12c, MDS
Author : Prasanna Jayaraman
Version: 4.0
-->
<project name="exportMDS" default="exportMDS">
<property file="build.properties"/>
<target name="exportMDS">
<echo>export and create local MDS temp</echo>
<echo>create zip from file MDS store</echo>
<delete dir="deploy"/>
<mkdir dir="deploy"/>
<zip destfile="deploy/mds.jar" compress="false">
<fileset dir="${mds.repository}/apps"/>
</zip>
<ant antfile="${middleware.home}/soa/bin/ant-sca-deploy.xml" inheritall="false" target="deploy">
<property name="wl_home" value="${middleware.home}/wlserver"/>
<property name="oracle.home" value="${middleware.home}/soa"/>
<property name="serverURL" value="${deploy.serverURL}"/>
<property name="user" value="${deploy.user}"/>
<property name="password" value="${deploy.password}"/>
<property name="overwrite" value="true"/>
<property name="forceDefault" value="true"/>
<property name="sarLocation" value="deploy/mds.jar"/>
<property name="failOnError" value="true"/>
</ant>
<echo message="finish" level="info"></echo>
</target>
</project>
How to delete deployed MDS?
If you deployed wrong files or deployed file to a wrong path, you could delete the document in the mds using the following commands. It works on both 11g and 12c SOA suite.
Open cmd and enter the following
set JAVA_HOME=C:\UBM\Programs\jdk1.7.0_79
set path=C:\UBM\Programs\jdk1.7.0_79\bin;C:\Oracle\Middleware12c\Oracle_Home\oracle_common\modules\org.apache.ant_1.9.2\bin;%PATH%
cd C:\Oracle\Middleware12c\Oracle_Home\soa\common\bin
wlst.cmd
connect('weblogic', 'welcome1', 't3://localhost:7101');
deleteMetadata(application='soa-infra',server='DefaultServer',docs='/apps/**');
This command will delete all the files under /apps directory in mds. If your using unix or linux then use linux syntax for setting path variable and java_home and then run wlst.sh under the same oracle path.
Other Useful Links