I've developed an application to analyze differences between 2 database tables (e.g., when migrating from DB2 to Oracle) - through JDBC connections - and I have a test case that I don't know how to solve:
some columns (in the Oracle database) are indexed in EBCDIC, via SYS_NC functions (e.g. SYS_NC00037$=NLSSORT("COL3",'nls_sort=''EBCDIC'''')), so when I search for the table's unique indexes, I get e.g. COL1, COL2, SYS_NC00037$, instead of COL1, COL2, COL3 (which I need, to be able to run the data comparison).
I can't see how to retrieve the information that SYS_NC00037 is associated with COL3, via the JDBC driver?
Looking at the data returned by DbVisualizer or DBeaver (which connect via JDBC), I can only see information about SYS_NCs in the DDL generation (which I don't know how to retrieve either, although it seems possible via JDBC). Thanks in advance for your answers!
Whenever a function-based index is created, the definition of any expression columns is stored in
dba_ind_expressions, keyed by column position (within the index). So:Just be aware that
column_expressionis alongwhich means you may need some PL/SQL to convert that to avarchar2(4000)in order to work with it in SQL downstream.