How to change an adapter for an existing datasource in TIBCO Data Virtualization?

How to change an adapter for an existing datasource in TIBCO Data Virtualization?

book

Article ID: KB0072821

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

Consider a scenario where the external data source may be been upgraded in-place. For example: Oracle 11G DB has been upgraded in-place to Oracle 12c and the data source originally created in TIBCO Data Virtualization(TDV) was with Oracle 11G adapter.
Note: This article assumes that no deliberate column type or schema changes were made to the schema during the Oracle DB upgrade.

Environment

All supported Operating Systems

Resolution

Unfortunately, at the time of this writing, we cannot change the underlying TDV adapter for an existing TDV datasource. We need to introspect the db again with the newer appropriate TDV adapter (ie; in this case, Oracle 12c). However, following these below steps will help minimize disruption to the existing queries that utilize the datasource.

Example for this Oracle scenario:
(1) Introspect Oracle with the newer 12c adapter from any resource path in Studio.
(2)  Export a copy of the current Oracle 11g data source for safe-keeping and make a note of the path of the current Oracle data source.
(3) Delete the Oracle 11g datasource from the Studio resources tree.  Do not move (cut/paste) it to another path in the Studio tree.
(4) Move (cut/paste) your new Oracle 12c datasource into the exact original path of the original Oracle 11g datasource.
(5) Give the Oracle 12c datasource the exact same name that the 11g datasource used to have.
With this, the existing views and SQL scripts procedures should continue to run normally without the need to rebind them to the new datasource.

Resources dependent on packaged queries:
Packaged queries are hard linked to the data sources, hence they need to be created again with the new data source. Follow the below steps: (example provided here is to help maintain consistency with the resource naming)
(1) Rename the existing packaged query to a different name. Eg: rename "originalresource" to "originalresource_bkp".
(2) Create a new packaged query in the same resource path with the original name of the existing package query. For above example, name it to "originalresource". Select the new Oracle 12c data source when creating this packaged query. 
(3) Copy the SQL from "originalresource_bkp" to "originalresource".
(4) Navigate to the parameters tab of "originalresource_bkp" and add the same parameter to "originalresource" with the "Design By example" option. Save the changes.
(5) Verify from the data lineage of the resources like stored procedures (that are dependent on packaged queries) that there are no error icons on them and execute the stored procedures from Studio to confirm. 

Issue/Introduction

How to change an adapter for an existing datasource in TIBCO Data Virtualization?