Page 1 of 1

Invalid Service Name using dotConnect for Oracle direct connect

Posted: Fri 20 Mar 2015 21:19
by John Liu
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

Re: Invalid Service Name using dotConnect for Oracle direct connect

Posted: Tue 24 Mar 2015 16:37
by Pinturiccio
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