Replace the Database Connections

Before performing this step, ensure that you have completed the migration of DBCS to the Oracle Cloud Infrastructure Database System. See Migrate the DBCS Data to an OCI Database System.

  1. Log in or sudo as the user owning the Oracle WebLogic Server files and locate your WebLogic domain configuration's config directory. If $DOMAIN_HOME is empty, set DOMAIN_HOME to the domain home of your Oracle WebLogic Server installation.
    sudo su - oracle
    cd $DOMAIN_HOME/config
  2. Back up the jdbc directory and the fmwconfig configuration files:
    cp -rp ./jdbc /tmp/ 
    cp -rp ./fmwconfig/jps-config*.xml /tmp/
  3. From the command line, get the existing connection string:
    grep url jdbc/opss-datasource-jdbc.xml
    An example of the output:
    <url>jdbc:oracle:thin:@//dbcshostfqdn:1521/pdb1.svcname</url>
  4. Extract the value between <url>jdbc:oracle:thin:@// and </url>. Continuing with the example, this is the value you would extract:
    dbcshostfqdn:1521/pdb1.svcname
  5. Replace the connection string retrieved (oldconnect) with the service value you fetched at the end of migrating DBCS to the Oracle Cloud Infrastructure Database System (newconnect). See Import the PDB from DBCS into the Oracle Cloud Infrastructure Database System.
    sed -i 's;oldconnect;newconnect;g'./jdbc/*.xml
    For example:
    sed -i 's;dbcshostfqdn:1521/pdb1.svcname;my.dbhost.vcnfqdn:1521/pdb1.sometext.vcnfqdn;g'./jdbc/*.xml
  6. Replace the connection string in the fmwconfig configuration files using the connection string (newconnect) from Step 5.
    sed -i 's;oldconnect;newconnect;g'./fmwconfig/jps-config*.xml
    For example:
    sed -i 's;dbcshostfqdn:1521/pdb1.svcname;my.dbhost.vcnfqdn:1521/pdb1.sometext.vcnfqdn;g'./fmwconfig/jps-config*.xml