5

so we migrated Oracle 12.2 to 19c and the Asp.Net app that connects to oracle service is now failing with the following error: Oracle 12560: TNS Protocol Adapter Error

before anything, I'd like to confirm that the .net dll System.Data.OracleClient would work against Oracle 19c or are we looking at migrating forcefully to ODP.Net??

  • Have you checked your connection string? That error is mainly associated with either connecting to a local instance (using oracle_sid and no connection string) when there is no local instance associated with that sid. It can also occur when you have a mismatch between your oracle_home and the driver used. Have you set the oracle_home environment variable? You may want to unset it (it's not usually used in Windows) – Andrew Sayer Nov 25 '20 at 20:58
  • Oracle 19c *reads as* Oracle 12c Release 2 (12.2.0.3), so - basically - code you use *should work*. For more info, re-read what @Andrew said. – Littlefoot Nov 25 '20 at 21:01

2 Answers2

6

It mainly depends on the client version, not the database version.

The System.Data.OracleClient namespace does not work anymore with Oracle client 18c or newer. If your application (i.e. the client) runs on your 19cdatabase server, then it will not work anymore.

NB, the System.Data.OracleClient driver is deprecated for more than 10 years.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • So what is the alternate now. As if now I was am using this fall with Oracle 11g db but just the db got upgraded to 19c and connection started failing now – ksrds Jul 06 '22 at 11:16
  • @ksrds Don't use `System.Data.OracleClient`, for alternatives see http://stackoverflow.com/questions/34803106/how-to-connect-to-oracle-11-database-from-net/34805999#34805999 – Wernfried Domscheit Jul 06 '22 at 11:25
2

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater. So if you use ODP.NET v.12.X, this bunch of OracleClient and ODP.NET will work with Oracle 19c. See also Connecting to Oracle19C Server using Oracle11g client