Page 1 of 1

Direct mode and dedicated connection

Posted: Mon 30 Jul 2018 08:57
by jajimenez
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.

Re: Direct mode and dedicated connection

Posted: Mon 30 Jul 2018 12:33
by MaximG
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['User_Name'] := 'scott';
  SQLConnection.Params.Values['Password'] := 'tiger';
  SQLConnection.Connected := True;

Re: Direct mode and dedicated connection

Posted: Wed 01 Aug 2018 08:24
by jajimenez
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?

Re: Direct mode and dedicated connection

Posted: Fri 03 Aug 2018 13:45
by MaximG
We will investigate the described issue and let you know the results shortly

Re: Direct mode and dedicated connection

Posted: Fri 03 Aug 2018 15:20
by jajimenez
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 ( )

Re: Direct mode and dedicated connection

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

Code: Select all

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?

Re: Direct mode and dedicated connection

Posted: Tue 28 Aug 2018 09:18
by jajimenez
Sorry for the delay. Our DBA was on holiday and I couldn't get help until yesterday (my user didn't have enough privileges to access v$session)

Our Oracle version is the same as yours, oracle 12.c release 2.

I have checked the query you told me and the result is always 'SHARED' (In SQLDeveloper connections I get 'DEDICATED' as expected)

Re: Direct mode and dedicated connection

Posted: Tue 11 Sep 2018 09:03
by MaximG
We again tested the possibility of using the DEDICATED connection with DevartOracleDirect using the following console application:

Code: Select all

program Project1;


{$R *.res}

  System.SysUtils, Data.DB, Data.SqlExpr,

  SQLConnection: TSQLConnection;
  SQLConnection := TSQLConnection.Create(nil);
    SQLConnection.ConnectionName :='Devart Oracle Direct';
    SQLConnection.DriverName := 'DevartOracleDirect';
    SQLConnection.Params.Values['User_Name'] := 'MaximG';
    SQLConnection.Params.Values['Password'] := 'MaximG Password';
    SQLConnection.Params.Values['Database'] := '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12c.testdata)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orclpdb.env)))';
    SQLConnection.Connected := True;

Then we got the query result (SELECT SID, SERVER, SCHEMANAME FROM v$session WHERE SCHEMANAME='MAXIMG' And PROGRAM='Project1.exe') shown in the screenshot :
Try performing the same actions in your test environment. Make sure again that in the test application and when using any third-party utilities, you connect with absolutely identical connection parameters.