direct mode connection string

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

direct mode connection string

Post by hepek » Tue 13 Sep 2022 17:00

hi,

I am using connection string like this:
"direct=True;Min Pool Size=5;Validate Connection=true;Connection Timeout=5;Default Command Timeout=90;Connection Lifetime=1800;user id=xxx;password=xxx;server=xxx;sid=xxx;Port=1521;persist security info=True"

I’ve heard this format is depreciated(sid in particular). what is the new format?

thank you

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: direct mode connection string

Post by hepek » Thu 15 Sep 2022 15:38

hi. anyone cares to answer this question please?

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: direct mode connection string

Post by hepek » Mon 19 Sep 2022 17:03

devart folks, please anwser my question.

is using SID in connection string obsolete? what format of connection stgring I should use for diurect connect?

my oracle experts tell me oracle will cut the support for SID, and they will use service name instead.
so how does the connection string look like withoud SID, but with service name?

thank you

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: direct mode connection string

Post by DmitryGm » Mon 03 Oct 2022 17:14

If your Oracle server requires SID to connect, use SID.
If it requires Service Name, use the Service Name.
Both options are possible and acceptable.

See also ConnectionString Property

Service Name Alias to an Oracle database instance (or many instances) to use in the OracleConnection.Direct mode. The default value is empty string. When Service Name is specified and implies several database instances, dotConnect for Oracle connects to the first instance provided by Oracle listener. Note that the Direct mode has limited support for RAC, it supports RAC with Connect Time Connection Failover (CTCF) only.

SID Unique name for an Oracle database instance to use in the OracleConnection.Direct mode. The default value is empty string.

The connection string could look like this:

Code: Select all

direct=True;user id=xxx;password=xxx;server=xxx;Service Name=xxx;Port=1521;

Post Reply