Invalid SID

Invalid SID

Postby 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.
mkashyap
 
Posts: 11
Joined: Mon 09 Nov 2009 21:26

Postby 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/43866/how-sid-is-different-from-service-name-in-oracle-tnsnames-ora.
Shalex
Devart Team
 
Posts: 7602
Joined: Thu 14 Aug 2008 12:44

Postby 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.
mkashyap
 
Posts: 11
Joined: Mon 09 Nov 2009 21:26

Postby 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).
Shalex
Devart Team
 
Posts: 7602
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle