System.Data.OracleClient Version

G

Guest

Recently I started a project attempting to connect to an Oracle 9i database
using the System.Data.OracleClient namespace with .Net 1.1. The database's
service name is longer than 16 characters & I have since found that their is
indeed a bug limiting service names to 16 characters in the namespace. What
is the latest version of the library I should be using? The assembly version
(installed on my development environment) for System.Data.OracleClient is
1.0.5000.0. Is there a fix forthcoming if this is the latest version?
 
D

David Browne

sra1001 said:
Recently I started a project attempting to connect to an Oracle 9i
database
using the System.Data.OracleClient namespace with .Net 1.1. The
database's
service name is longer than 16 characters & I have since found that their
is
indeed a bug limiting service names to 16 characters in the namespace.
What
is the latest version of the library I should be using? The assembly
version
(installed on my development environment) for System.Data.OracleClient is
1.0.5000.0. Is there a fix forthcoming if this is the latest version?

This is indeed a bug in System.Data.OracleClient. And a very annoying one
too.

Basically the only thing that it will accept is a tns alias, which condemns
us to using the tnssames.ora file.

Anyway this is your workaround. Go and edit your tnsnames.ora file and give
the entry a shorter alias. Or use ODP.NET which doesn't have this problem.

At a minimum service name should support long names of the form:
//host:port/service
which is the new tns-less naming convention supported by the Oracle 10g
client (especially usefull with the InstantClient which doesn't need to be
installed).

Further it should support the long service name descriptor for which the
tns-alias is an alias. Eg

string service = @"
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydbserver)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)"

Which works with any version of the Oracle client.

Hopefully this will be fixed in 2.0

David
 
G

Guest

Thanks David!

David Browne said:
This is indeed a bug in System.Data.OracleClient. And a very annoying one
too.

Basically the only thing that it will accept is a tns alias, which condemns
us to using the tnssames.ora file.

Anyway this is your workaround. Go and edit your tnsnames.ora file and give
the entry a shorter alias. Or use ODP.NET which doesn't have this problem.

At a minimum service name should support long names of the form:
//host:port/service
which is the new tns-less naming convention supported by the Oracle 10g
client (especially usefull with the InstantClient which doesn't need to be
installed).

Further it should support the long service name descriptor for which the
tns-alias is an alias. Eg

string service = @"
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydbserver)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)"

Which works with any version of the Oracle client.

Hopefully this will be fixed in 2.0

David
 
D

David Browne

sra1001 said:
Thanks David!

:

BTW in 2.0 (Beta 2) the max length of the Data Source is increased to 128.

Both the //host:port/service and long descriptors work.



David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top