0

I am porting some server applications from .NET 2.0 to .NET 4.5. I thought it might also be a good idea to get rid of the dependency on the deprecated System.Data.OracleClient. However, my IT department seems pretty insistent on installing the full Oracle 11G client on the server, and then maintaining updates itself, along with updates to tnsnames.ora.

Can I still use ODP.NET without installing InstantClient, and just have it use the already existing full client? If so, are there any options the Server team would need to install with the full client install to make it work with ODP.NET? If so, should I use the Managed, or Unmanaged version of ODP.NET, and/or should I use an older version of ODP.NET for 11g?

I am developing in VS 2012 and in .NET 4.5. Any direction (along with download links) would be much appreciated!

David P
  • 2,027
  • 3
  • 15
  • 27

1 Answers1

1

You question is a bit confusing.

ODP.NET Managed Driver does not require any Oracle Client installation. You should prefer it if it fulfills all your needs.

System.Data.OracleClient is deprecated since long time by Microsoft as you stated. However, like Oracle.DataAccess (ODP.NET) it requires an Oracle Client installation. So, Oracle InstantClient is required in any case (unless you use the ODP.NET Managed Driver). The Unmanaged ODP.NET is also available for Oracle version 12.

I also don't get the issue with tnsnames.ora. Both, System.Data.OracleClient and Oracle.DataAccess (ODP.NET) work with or without an tnsnames.ora file, it should not make any difference. See example connection strings for Microsoft and Oracle with and without tnsnames.ora.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • So if I use ODP.NET Unmanaged driver I have to install the instant client, or can it use the 11g Full Client that the IT folks are going to install and maintain on the server? I "think" I might prefer to use the unmanaged driver simply because I believe it supports UDTs and VARRAYS, and so I could map those to a C# class in my application when calling stored procedures. I was under the impression that the Managed driver didn't support this. – David P Dec 08 '15 at 15:02
  • Also if I want to connect via tnsnames.ora how do I specify the location of that, or will it just know from environment variables? – David P Dec 08 '15 at 15:03
  • For tnsnames.ora check this answer: http://stackoverflow.com/questions/28280883/determining-locatation-of-relevant-tnsnames-ora-file/28283924#28283924 – Wernfried Domscheit Dec 08 '15 at 15:54
  • Instant Client is the absolute minimum of an Oracle Client installation. Full Client includes that, of course. – Wernfried Domscheit Dec 08 '15 at 15:57