Pages

Tuesday, October 1, 2013

Web Logic : Migrate Data Sources From One Domain To Another

There are some times Where we need to move applications from One Domain to another. The most important aspect during this phase is the creation of Data Sources in the New Domain.

This article tell you how to Copy a Data Source from one Domain to another.

1.Copy the Data Souce xml files from the location , WL_HOME\user_projects\domains\<YOUR_DOMAIN_NAME>\config\jdbc folder

to the same location of another domain (or in another machine )

2.Make entry in the config.xml file.
Once the copying of the data Souce .xml files is done , we need to make entry for the jdbc data Souces in the config.xml file which is located at BEA_HOME\user_projects\domains\YOUR_DOMAIN_NAME\config folder.

For example ,if we are copying cbs_Pool to another Domain ,we can locate admin-server-name node in config.xml file and add below entries for each Datasource.

<jdbc-system-resource>
<name>cbs_Pool</name>
<target>ABCE-A,ABCE -B,ABCE -C</target>
<descriptor-file-name>jdbc/cbs_Pool-9207-jdbc.xml</descriptor-file-name>
<jdbc-system-resource>

Just repeat the same steps for every Data Source we are copying.

3.Now the last and final Important Part is to set passwords for the Data Sources copied. Every Data Sauce in a domain is encrypted using the SerializedSystemIni.dat file available in BEA_HOME\user_projects\domains\YOUR_DOMAIN_NAME\security folder.

First Decrypt the passwords for the Data Sources using the Old Domain SerializedSystemIni.dat File. Here is a link on how to do this.

Once the Passwords are decrypted , We now need to encrypt again using the new Domain SerializedSystemIni.dat file.

We can use the available web logic command like
java weblogic.security.Encrypt <Password To Encrypt>
to encrypt the passwords.

Once the Passwords are encrypted , we can modify the password element in the dataSouce.xml file that we copied.

4.Restart the admin Server and Cluster for the changes to take effect.

More to Come , Happy learning :-)