SAP Knowledge Base Article - Preview

3079778 - Wrong output from SDA - SAP DBTech JDBC: [260]

Symptom

Remote source ABC-KLL_PROD on ABC is mapped to oracle DB name ABC-KLL_PROD. When running the statement:

SELECT AA_ABCDE_UVWXYZ FROM "ABC-KLL_PROD".KLL.BW_V_FILE_DATA_CP WHERE zhgfile = 256

The following error return:
Could not execute 'SELECT AA_ABCDE_UVWXYZ FROM "ABC-KLL_PROD".KLL.BW_V_FILE_DATA_CP WHERE zhgfile = 256 --call ...' in 5 ms 85 µs . SAP DBTech JDBC: [260]: invalid column name: AA_ABCDE_UVWXYZ: line 1 col 8 (at pos 7)

But if create a new remote source "ABC-KLL_PROD_test" which has the exact configuration as "ABC-KLL_PROD", the statement:

SELECT AA_ABCDE_UVWXYZ FROM "ABC-KLL_PROD_test".KLL.BW_V_FILE_DATA_CP WHERE zhgfile = 256

It runs without error.


From the provided "fedtrace" trace we see, that there is no error coming from fedtrade and the remote object is retrieved successfully:

[301413]{364168}[115/-1] 2021-07-01 10:04:51.244789 i TraceContext TraceContext.cpp(01268) : UserName=SHKURENKOVID, ApplicationUserName=VTB70148794, ApplicationName=HDBStudio, ApplicationSource=csns.sql.editor.SQLExecuteFormEditor$4$1.run(SQLExecuteFormEditor.java:938);, StatementHash=bbc06bc39a9ffe7cea6dd5829592164f, StatementExecutionID=844440024922944
[301413]{364168}[115/-1] 2021-07-01 10:04:51.244773 d FedTrace LinkedDatabase.cpp(00549) : LinkedDatabaseManager::_getLinkedDatabaseTableInfodatabaseName ABC-KLL_PROD schemaName KLL tableName BW_V_FILE_DATA_CP
[301413]{364168}[115/-1] 2021-07-01 10:04:51.244901 d FedTrace LinkedDatabase.cpp(00599) : LDB: Found object


For the error case, it only has two lines from trace file:

[104242]{356579}[44/-1] 2021-07-13 16:28:04.280676 d FedTrace LinkedDatabase.cpp(00549) : LinkedDatabaseManager::_getLinkedDatabaseTableInfodatabaseName ABC-KLL_PROD schemaName KLL tableName BW_V_FILE_DATA_CP
[104242]{356579}[44/-1] 2021-07-13 16:28:04.280796 d FedTrace LinkedDatabase.cpp(00599) : LDB: Found object

No further information logged.

Then it continues with the successful case:

[111634]{356579}[44/-1] 2021-07-13 16:28:04.290120 i TraceContext TraceContext.cpp(01268) : UserName=SHKURENKOVID, ApplicationUserName=VTB70148794, ApplicationName=HDBStudio, ApplicationSource=csns.sql.editor.SQLExecuteFormEditor$4$1.run(SQLExecuteFormEditor.java:938);, StatementHash=73d01888a9824bb1d458762a7095ec06, StatementExecutionID=844440140267774
[111634]{356579}[44/-1] 2021-07-13 16:28:04.290109 d FedTrace LinkedDatabase.cpp(00549) : LinkedDatabaseManager::_getLinkedDatabaseTableInfodatabaseName ABC-KLL_PROD_test schemaName KLL tableName BW_V_FILE_DATA_CP
[111634]{356579}[44/-1] 2021-07-13 16:28:04.290191 d FedTrace LinkedDatabase.cpp(00599) : LDB: Found object
[111634]{356579}[44/-1] 2021-07-13 16:28:04.291554 d FedTrace LinkedDatabase.cpp(00549) : LinkedDatabaseManager::_getLinkedDatabaseTableInfodatabaseName ABC-KLL_PROD_test schemaName KLL tableName BW_V_FILE_DATA_CP
[111634]{356579}[44/-1] 2021-07-13 16:28:04.291606 d FedTrace LinkedDatabase.cpp(00599) : LDB: Found object
[111634]{356579}[44/-1] 2021-07-13 16:28:04.293322 d FedTrace FederationContext.cpp(00079) : Fedcontext created 0x00007f06bf111c10
[111634]{356579}[44/-1] 2021-07-13 16:28:04.293332 d FedTrace FederationContext.cpp(00256) : getRuntimeContextSmartPtr::Generated federation context for (356579, 0)
[111634]{356579}[44/-1] 2021-07-13 16:28:04.293383 d FedTrace FederationContext.cpp(00241) : getRuntimeContextSmartPtr::Returned federation context for (356579, 0)
[111634]{356579}[44/-1] 2021-07-13 16:28:04.293419 d FedTrace FederationSourceProps.cpp(00040) : New FederationSourceProps: Server name: ABC-KLL_PROD_test, server ID: 29548734, volume ID: -1, source props: <?xml version="1.0" encoding="UTF-8"?><ConnectionProperties name="connection_properties"><PropertyEntry name="adapterversion">12c</PropertyEntry><PropertyEntry name="connectionmode">Data source name</PropertyEntry><PropertyEntry name="adapter_config_file">property_orcl.ini</PropertyEntry><PropertyEntry name="extraadapterproperties">oracle</PropertyEntry><PropertyEntry name="dsn">ABC-KLL_PROD</PropertyEntry><PropertyEntry name="dml_mode">readonly</PropertyEntry></ConnectionProperties>
[111634]{356579}[44/-1] 2021-07-13 16:28:04.293712 d FedTrace FederationRdes.cpp(00146) : new rdes create with current contextID: 111634 threadID: 140097307506432
[111634]{356579}[44/-1] 2021-07-13 16:28:04.294053 d FedTrace odbccustom.cpp(00694) : Configuration file:/usr/sap/ABC/HDB00/exe//config/property_orcl.ini

..


It compiles and executes the remote query:

[111634]{356579}[87/-1] 2021-07-13 16:28:04.539179 i SqlOptStep TraceManager.cc(00242) : [Query Compile] Compiled Query String ========================
statement_hash: 73d01888a9824bb1d458762a7095ec06
SELECT AA_ABCDE_UVWXYZ FROM "ABC-KLL_PROD_test".KLL.BW_V_FILE_DATA_CP WHERE zhgfile = 256


From the trace files, the non-error case with remote source "ABC-KLL_PROD_test" continues with further steps and eventually compile and execute the remote query after "object found".
However, for the error case with remote source "ABC-KLL_PROD", it stopped at "object found" with no further entries, and no error is logged at all.


These following statements is to check the metadata of the configured remote sources and let us know the results.

select * from remote_sources;
select * from m_remote_sources;
select * from remote_source_objects;


In that case, the configurations for remote source "ABC-KLL_PROD_test" and "ABC-KLL_PROD" are the same from the input.

Few more things to check:

1. select * from sys.table_columns where column_name = 'AA_ABCDE_UVWXYZ';
2. select * from virtual_tables where table_name like '%BW_V_FILE_DATA_CP';
3. select * from M_DATABASE_HISTORY;


The output from query #2 show, that there exist virtual table name "BW_V_FILE_DATA_CP" under remote source "ABC-KLL_PROD", schema "KLL" in the first frame, and yet the statement doesn't return anything.


Read more...

Environment

SAP HANA DB 2.0

Product

SAP HANA, platform edition 2.0

Keywords

KBA , HAN-DB-SDA , SAP HANA Smart Data Access , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.