Replace an Existing Oracle Cloud Infrastructure Database with a New Oracle Cloud Infrastructure Database

Best Practices:

  • This procedure is applicable only for Oracle SOA Suite on Marketplace instances, not for Oracle Managed File Transfer instances.
  • Try these steps on a development or test environment before trying them on production servers.
  • Initiate an on-demand backup to back up your Oracle SOA Suite domain.
  • You should already have an Oracle SOA Suite environment provisioned with an Oracle Cloud Infrastructure native database.

To replace an existing Oracle Cloud Infrastructure database with a new Oracle Cloud Infrastructure database:

  1. Create the new database from a backup of the existing database.
  2. Identify the connect string of the existing database.

    You can find the connect string using the WebLogic Server Administration Console. Go to SOADataSource > Configuration tab > Connection Pool tab > URL field.

    For example:

    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oldDB-scan.subnetname.vcnname.oraclevcn.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=oldPDB.subnetname.vcnname.oraclevcn.com))) 
  3. From the WebLogic Server Administration Console, stop the Administration Server and Managed Servers. See Stop or Start WebLogic Servers.
  4. Use the ssh command to connect to the Administration Server VM (as the opc user):

    ssh -i private_key opc@AdminServerVM_IP_address
  5. Change to the oracle user:

    sudo su - oracle
  6. Identify all occurrences of the existing database connect string in your domain by using the grep command.

    For example:

    grep -rlw --exclude={*.txt,*.log,*.out} -e "olddb-scan.subnetname.vcnname.oraclevcn.com" SOATest_domain
  7. Complete the following steps for all nodes of the Oracle SOA Suite cluster:
    1. Back up the existing database connect string files. For example:
      cp SOATest_domain/config/fmwconfig/jps-config-jse.xml SOATest_domain/config/fmwconfig/jps-config-jse.xml_orig_date
      cp SOATest_domain/config/fmwconfig/jps-config.xml SOATest_domain/config/fmwconfig/jps-config.xml_orig_date
      cp SOATest_domain/config/jdbc/ess-oracle-int-jdbc.xml SOATest_domain/config/jdbc/ess-oracle-int-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/BamDataSource-mds-jdbc.xml SOATest_domain/config/jdbc/BamDataSource-mds-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/BamDataSource-jdbc.xml SOATest_domain/config/jdbc/BamDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/mds-ess-jdbc.xml SOATest_domain/config/jdbc/mds-ess-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/ess-oracle-jdbc.xml SOATest_domain/config/jdbc/ess-oracle-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/wlsbjmsrpDataSource-jdbc.xml SOATest_domain/config/jdbc/wlsbjmsrpDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/mds-owsm-jdbc.xml SOATest_domain/config/jdbc/mds-owsm-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/SOADataSource-jdbc.xml SOATest_domain/config/jdbc/SOADataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/LocalSvcTblDataSource-jdbc.xml SOATest_domain/config/jdbc/LocalSvcTblDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/EDNLocalTxDataSource-jdbc.xml SOATest_domain/config/jdbc/EDNLocalTxDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/opss-auditview-jdbc.xml SOATest_domain/config/jdbc/opss-auditview-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/OraSDPMDataSource-jdbc.xml SOATest_domain/config/jdbc/OraSDPMDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/EDNDataSource-jdbc.xml SOATest_domain/config/jdbc/EDNDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/ess-oracle-xa-jdbc.xml SOATest_domain/config/jdbc/ess-oracle-xa-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/BamNonJTADataSource-jdbc.xml SOATest_domain/config/jdbc/BamNonJTADataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/opss-audit-jdbc.xml SOATest_domain/config/jdbc/opss-audit-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/WLSSchemaDataSource-jdbc.xml SOATest_domain/config/jdbc/WLSSchemaDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/opss-datasource-jdbc.xml SOATest_domain/config/jdbc/opss-datasource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/SOALocalTxDataSource-jdbc.xml SOATest_domain/config/jdbc/SOALocalTxDataSource-jdbc.xml_orig_date
      cp SOATest_domain/config/jdbc/mds-soa-jdbc.xml SOATest_domain/config/jdbc/mds-soa-jdbc.xml_orig_date
      cp SOATest_domain/dbfs/tnsnames.ora SOATest_domain/dbfs/tnsnames.ora_orig_date
      
    2. Replace the existing database connect string with the new database connect string (newdb-scan):
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/fmwconfig/jps-config-jse.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/fmwconfig/jps-config.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/ess-oracle-int-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/BamDataSource-mds-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/BamDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/mds-ess-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/ess-oracle-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/wlsbjmsrpDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/mds-owsm-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/SOADataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/LocalSvcTblDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/EDNLocalTxDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/opss-auditview-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/OraSDPMDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/EDNDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/ess-oracle-xa-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/BamNonJTADataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/opss-audit-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/WLSSchemaDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/opss-datasource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/SOALocalTxDataSource-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/config/jdbc/mds-soa-jdbc.xml
      sed -i 's/olddb-scan/newdb-scan/g' SOATest_domain/dbfs/tnsnames.ora
      
    3. If you use a different PDB name for the new database, then run the following command:
      sed -i 's/oldPDB/newpdb/g' SOATest_domain/config/fmwconfig/jps-config-jse.xml 
  8. Restart the Administration Server and Managed Servers. See Stop or Start WebLogic Servers.
  9. After restarting, confirm that your SOA servers connect to the new database. Your new connect string in the WebLogic Server Administration Console should look like this:

    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newDB-scan.subnetname.vcnname.oraclevcn.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=newPDB.subnetname.vcnname.oraclevcn.com)))

  10. Optionally, run the RCU utility to drop the old database schemas.