Question & Answer
Question
How do I correct the JDBC Adapter artifacts created by the Enterprise Service Discovery Wizard after the schema name in a database has changed, so that the JDBC Adapter can still run successfully?
Answer
If only the schema is changed and table name is not changed, all that you need to do is to check two kinds of files: *.export for inbound process (or *.import for outbound) and *.xsd, and change original schema to the new schema.
1. Navigate to the Java™ perspective, locate and open the .export file (or .import for outbound) in the Text Editor, change the user and password in the file. For example, there is a JDBCInboundInterface.export likes this:
<connection type="com.ibm.j2ca.jdbc.inbound.JDBCActivationSpecWithXid" listenerType="com.ibm.j2ca.base.ExtendedInboundListener" selectorType="com.ibm.j2ca.extension.emd.runtime.StructuredDataFunctionSelector">
<properties>
<databaseURL>jdbc:oracle:thin:@localhost:1521:ORA92</databaseURL>
<databaseVendor>ORACLE</databaseVendor>
<jdbcDriverClass>oracle.jdbc.driver.OracleDriver</jdbcDriverClass>
<password>jcajdbc</password>
<returnDummyBOForSP>false</returnDummyBOForSP>
<userName>jcajdbc</userName>
</properties>
</connection>
What you need to do is to change the user and the password (jcajdbc/jcajdbc in the above example) to the user and the password used by the new schema.
2. Change the corresponding table and procedure name (if you defined in BO). For example, the following is a snippet of a sample JcajdbcCustomer.xsd:
<jdbcasi:TableName>JCAJDBC.CUSTOMER</jdbcasi:TableName>
<jdbcasi:Operation>
<jdbcasi:Name>Retrieve</jdbcasi:Name>
<jdbcasi:StoredProcedures>
<jdbcasi:StoredProcedureType>BeforeRetrieveSP</jdbcasi:StoredProcedureType>
<jdbcasi:StoredProcedureName>JCAJDBC.fn_beforeRetrievesSP</jdbcasi:StoredProcedureName>
<jdbcasi:ReturnValue>RS</jdbcasi:ReturnValue>
<jdbcasi:Parameters>
<jdbcasi:Type>IP</jdbcasi:Type>
<jdbcasi:PropertyName>pkey</jdbcasi:PropertyName>
</jdbcasi:Parameters>
</jdbcasi:StoredProcedures>
<jdbcasi:StoredProcedures>
<jdbcasi:StoredProcedureType>AfterRetrieveSP</jdbcasi:StoredProcedureType>
<jdbcasi:StoredProcedureName>JCAJDBC.sp_afterRetrieveSP</jdbcasi:StoredProcedureName>
<jdbcasi:Parameters>
<jdbcasi:Type>IP</jdbcasi:Type>
<jdbcasi:PropertyName>fname</jdbcasi:PropertyName>
</jdbcasi:Parameters>
<jdbcasi:Parameters>
<jdbcasi:Type>OP</jdbcasi:Type>
<jdbcasi:PropertyName>RS</jdbcasi:PropertyName>
</jdbcasi:Parameters>
</jdbcasi:StoredProcedures>
</jdbcasi:Operation>
</jdbcasi:JDBCBusinessObjectTypeMetadata>
All that you need to do is to change JCAJDBC.CUSTOMER to <NewSchema>.CUSTOMER, change JCAJDBC.fn_beforeRetrievesSP to <NewSchema>.fn_beforeRetrievesSP, and change JCAJDBC.sp_afterRetrieveSP to <NewSchema>.sp_afterRetrieveSP.
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21383179