Direct mode and dedicated connection

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
jajimenez
Posts: 3
Joined: Wed 21 Jan 2015 08:30

Direct mode and dedicated connection

Post by jajimenez » Mon 30 Jul 2018 08:57

I am using dbexpress in direct mode. Is it possible to establish a dedicated connection?

I have not been able to find anything about it in the documentation or forum.

Thanks in advance.

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: Direct mode and dedicated connection

Post by MaximG » Mon 30 Jul 2018 12:33

You can use the description of the TNS alias when working in Direct Mode in the same way as in OCI Mode. To do this, assign the required value to the DataBase property :

Code: Select all

 ...
  SQLConnection.DriverName := 'DevartOracleDirect';
  SQLConnection.Params.Values['DataBase'] := '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<your HOST>)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<your SERVICE_NAME>)))';
  SQLConnection.Params.Values['User_Name'] := 'scott';
  SQLConnection.Params.Values['Password'] := 'tiger';
  SQLConnection.Connected := True;
  ...

jajimenez
Posts: 3
Joined: Wed 21 Jan 2015 08:30

Re: Direct mode and dedicated connection

Post by jajimenez » Wed 01 Aug 2018 08:24

Thanks for your help, but it didn't work.

I have tried and I can connect with parameters in TNS style, but the connection is still shared. If it helps, this is my code:

SQLConnection.Params.Values['DataBase'] := '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service name>)))';

But when the program connects to Oracle, what Oracle gets is this:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<service ame>)(CID=(PROGRAM=<exe name>)(HOST=<my PC's name>)(USER=<my Windows username>))))

It seems that, no matter what the value for SERVER is, it is always omitted in the connection.

Any other idea to try?

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: Direct mode and dedicated connection

Post by MaximG » Fri 03 Aug 2018 13:45

We will investigate the described issue and let you know the results shortly

jajimenez
Posts: 3
Joined: Wed 21 Jan 2015 08:30

Re: Direct mode and dedicated connection

Post by jajimenez » Fri 03 Aug 2018 15:20

Thank you for your attention.

If it helps: I have checked both Delphi 7 and XE 10.2 using the latest version of your DLLs ( 6.10.15.0 )

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: Direct mode and dedicated connection

Post by MaximG » Mon 06 Aug 2018 13:54

We tested the operation of our driver according to your description and found no problems. In our tests, we used Oracle server 12.2.0.1.0, as well as the latest version of our driver. The connection mode was checked by requesting the v$session view :

Code: Select all

 SELECT SERVER FROM v$session WHERE SCHEMANAME='SCOTT' 
When connected according to the sample above, this query returns the "DEDICATED" value. Please specify the Oracle server version you are using. What value will the query return to the v$session view when performing similar actions in your environment?

Post Reply