Invalid Service Name using dotConnect for Oracle direct connect

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Invalid Service Name using dotConnect for Oracle direct connect

Post by John Liu » Fri 20 Mar 2015 21:19

dotConnect for Oracle version 8.2.90 with EntityFramework 6.0.2

Using the following connection string, I can connect to almost all our Oracle 11g instances
<add name="myDbContext" connectionString="server=10.1.20.86;port=1521;direct=True;service name=CDB;user id=aaa;Password=pppp;" providerName="Devart.Data.Oracle" />

Trying to connect to one of our databases, it gives me the error "Invalid Service Name". But it is ok to connect to it using SID with the following connection string
<add name="myDbContext" connectionString="server=10.1.20.86;port=1521;direct=True;SID=CDB;user id=aaa;Password=pppp;" providerName="Devart.Data.Oracle" />
thanks
JL

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Invalid Service Name using dotConnect for Oracle direct connect

Post by Pinturiccio » Tue 24 Mar 2015 16:37

The SID and 'Service Name' connection string parameters must specify the SID and Service Name respectively, they are two different connection string parameters, please see:
http://www.devart.com/dotconnect/oracle ... tring.html
http://www.devart.com/dotconnect/oracle ... tMode.html

Most likely, in your case, these parameters have different values and you use the value of the SID.
Please refer to these posts for more information:
http://www.dba-oracle.com/t_oracle_sid_ ... e_name.htm
http://stackoverflow.com/questions/4386 ... snames-ora

Post Reply