Invalid SID

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
mkashyap
Posts: 11
Joined: Mon 09 Nov 2009 21:26

Invalid SID

Post by mkashyap » Mon 01 Mar 2010 18:12

Hi,

We are using the direct mode to connect to an Oracle server. We are using the TNSNames.Ora to get the connection information and are using the service name to set the SID property. It works fine if we have a tns entry similar to this ---
ORA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = xxx.xx.xxx.x)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SERVICE_NAME = OPRD)
)
)

However, one of our clients have a different service name, as below and they are getting an error--
oprd =
(description =
(address_list =
(address = (protocol = tcp)(host = server)(port = 1521))
)
(connect_data =
(service_name = oprd.somecompany.com)
)
)

If we were to set the SID=oprd, it works fine but setting it as
SID= oprd.somecompany.com, it is not working.

Could you please tell me how to handle this?

Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 02 Mar 2010 17:43

SID is the unique name of your database instance.
Service name is an alias to an instance (or many instances).
Please refer to http://stackoverflow.com/questions/4386 ... snames-ora.

mkashyap
Posts: 11
Joined: Mon 09 Nov 2009 21:26

Post by mkashyap » Mon 08 Mar 2010 23:13

Is there a way we can pass a service name to dotConnect using the direct mode? I did not come across any properties for that. I was wondering if I was missing something.

Also, how does dotConnect handle clusters?

Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 09 Mar 2010 14:35

1. Service name is the Oracle Client parameter. It is necessary to set the SID parameter in the Direct mode. Executing "select INSTANCE_NAME from v$instance" will give you the SID/instance name of the database. There are other ways to get the SID value, please refer to the Oracle documentation.

2. RAC is supported in the OCI mode only (the Direct=false; parameter in the connection string). All Oracle client settings should be specified in the tnsnames.ora file of your Oracle client (http://download.oracle.com/docs/cd/B283 ... snames.htm).
In direct mode (the Direct=true; parameter in the connection string) the RAC option of Oracle server is not available (you can connect only to each database instance separately).

Post Reply