Wednesday, April 26, 2017

ODI12c Error oracle.odi.runtime.agent.invocation.InvocationException: oracle.odi.core.exception.OdiRuntimeException: java.sql.SQLException: [FMWGEN][SForce JDBC Driver][SForce]The configuration options used to open the database do not match the options used to create the database.

If experiencing below error:
oracle.odi.runtime.agent.invocation.InvocationException: oracle.odi.core.exception.OdiRuntimeException: java.sql.SQLException: [FMWGEN][SForce JDBC Driver][SForce]The configuration options used to open the database do not match the options used to create the database. 
Cause:
The error existed after I created a second connection to the same Salesforce instance, and modified the connection URL. This error is returned when using a connection URL that is sharing local database files with another connection URL.

Background:
The JDBC driver uses a local embedded database to automatically map Salesforce objects and fields to tables and columns the first time it connects to a Salesforce instance. In default, it uses the user ID specified for the connection as the name of the local embedded database, otherwise you can set in your connection URL the DatabaseName.

Workaround:

  1. Go to the directory where the embedded database files are saved, <ODI_HOME>\odi\studio\bin and delete these files: odi.app, odi_properties.new, odi_script.new, odi_SFORCE.map, odiSFORCE.native, odi.config (The files names could be different if in your config url you have set the DatabaseName. Default database name is the user id which in my case is odi. This files will be recreated when you create, update or open the Physical schema for this connection.)
  2. In Topology > Salesforce.com > [Your Salesforce Data Server], update the JDBC URL to jdbc:weblogic:sforce://<Your_Salesforce_Instance_URL>;CreateDB=forceNew;ConfigOptions=(auditcolumns=all;MapSystemColumnNames=0;CustomSuffix=include;);
  3. Save & Test the Connection.
  4. Open the Physical Schema so that the embedded database files will be updated or recreated.
  5. Disconnect from the current ODI session.
  6. Reconnect.
  7. Update the JDBC URL. Remove the CreateDB option. Otherwise, you may get an error that the Database is in use. Save, and your connection to Salesforce should be good.
For more information on the connection properties supported by the Salesforce.com driver, see http://media.datadirect.com/download/docs/jdbc/alljdbc/help.html#page/jdbcconnect%2FConnection_Properties_11.html%23wwID0EZT5Y.

15 comments:

Using a Variable to capture Error Messages in ODI12c Load Plans

Create a Variable to hold the Error Message. In this example, I am creating a Global Variable. In the Refreshing tab, enter the follow...