tonyb
tonyb

Reputation: 459

A connection to SAP HANA database through ODBC connection stopped working

A connection to SAP HANA database through ODBC connection stopped working in a C# program using .NET Framework 4.7, and also tested at .NET Framework 4.0.

Error:

System.Data.Odbc.OdbcException ERROR [08S01] [SAP AG][LIBODBCHDB DLL][HDBODBC] Communication link failure;-10709 Connection failed (RTE:[89001] Cannot resolve host name 'dbhana01' rc=11003: A non-recoverable error occurred during a database lookup. (dbhana01:30015))

I was executing a query from freshly compiled Visual Studio code and Interestingly I had one application that did work and one that did not, the code and queries were the same.

I tried changing the NET framework, trying 32 bit and 64 bit driver options and compile options

Upvotes: 0

Views: 982

Answers (1)

tonyb
tonyb

Reputation: 459

I know there can be many different reasons a SAP Hana connection may not work. In this case it turned out to be caused by the level of trust given to the location of the compiled executable.

When the application was compiled on my companies network 'J' drive it did not work and gave the error message shown in the question. When compiled on my computers local 'C' drive, it worked just fine.

One clue about this that I overlooked, was that Visual studio asks if it is safe to open each project from the network location when opening the solution.

Upvotes: 1

Related Questions