Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: dbexpress compatible with Oracle 12c?


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Dec 15, 2014 11:33 AM Last Post By: Jeff Chojnacki Threads: [ Previous | Next ]
Jeff Chojnacki

Posts: 5
Registered: 5/4/02
dbexpress compatible with Oracle 12c?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2014 10:18 AM
Using Delphi XE2, as far as I can tell dbExpress is compatible with Oracle 12c and the Oracle 12c Fat client. However I found one possible issue with a simple demo Datasnap server. Each multi-threaded database connection is leaking handles and memory. I can reproduce this on two VMs with the 12.1.0.1 fat client. If I make all the connections on the main thread, TThread.Synchronize the "sqlconnection.connected = True", then the leak is no longer present. Each connection leaks 9 un-named mutex handles and a variable amount (~40k per connection) of windows heap (outside of FastMM allocations). I cannot reproduce this with the Oracle 11c fat client against Oracle 11g.

I ported that datasnap demo to XE6 and FireDac and it exhibits the exact same behavior.

The Oracle OCI group tells me I need to re install, "we don't see it", and submit a ticket. Apparently there are no settings I can change in the fat client. So are we sure that these database layers are fully compatible with 12c? The docs just say Oracle 8 and higher. I'm lost which direction to isolate this problem. Is it a Delphi issue, Configuration of either side, or an Oracle issue.

I know this is an odd one and maybe I'm missing something obvious. So thanks in advance for any help or ideas or criticism of any kind.

Jeff Chojnacki
quinn wildman

Posts: 856
Registered: 12/2/99
Re: dbexpress compatible with Oracle 12c?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2014 11:20 AM   in response to: Jeff Chojnacki in response to: Jeff Chojnacki
Readme.htm tells you versions of Oracle are supported with DBExpress.
You'll note the highest Oracle version supported there is 11. So, while
DBExpress may work with 12, we have not tested it and promise nothing.

OTOH, FireDAC should work just fine and that is what I recommend you
investigate in more depth. However, if there is a problem, we certainly
would not update XE2 as it's too old. Any fix would come no early than
XE7, so you are well advised to try it first. If you find a FireDAC
problem with XE7 using Oracle 12, then I recommend you post to a FireDAC
newsgroup for more discussion.

Jeff Chojnacki wrote:
Using Delphi XE2, as far as I can tell dbExpress is compatible with Oracle 12c and the Oracle 12c Fat client.
Jeff Chojnacki

Posts: 5
Registered: 5/4/02
Re: dbexpress compatible with Oracle 12c?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2014 2:23 PM   in response to: quinn wildman in response to: quinn wildman
Thanks for the reply Quinn.
I found the XE2 readme file and the online notes for XE6 dbExpress supported list. Thanks.
I tested again using the DevArt dbExpress driver for Oracle version 6.4.7 with Delphi XE6. Oracle 12c support started with version 6.3.4. I still see the same leak behavior.
Both test servers are using Oracle client 12.1.0.1. I asked IT to upgrade one to 12.1.0.2 to see if there is a difference.

Unfortunately we are not converting to FireDAC until sometime next year using XE6 or higher. So I can't do XE7 tests right now.

quinn wildman wrote:
Readme.htm tells you versions of Oracle are supported with DBExpress.
You'll note the highest Oracle version supported there is 11. So, while
DBExpress may work with 12, we have not tested it and promise nothing.

OTOH, FireDAC should work just fine and that is what I recommend you
investigate in more depth. However, if there is a problem, we certainly
would not update XE2 as it's too old. Any fix would come no early than
XE7, so you are well advised to try it first. If you find a FireDAC
problem with XE7 using Oracle 12, then I recommend you post to a FireDAC
newsgroup for more discussion.
quinn wildman

Posts: 856
Registered: 12/2/99
Re: dbexpress compatible with Oracle 12c?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2014 9:09 AM   in response to: Jeff Chojnacki in response to: Jeff Chojnacki
Because you are using a driver from Devart, you need to contact Devart.
Any memory leak in this scenario not be coming from our code.

Jeff Chojnacki wrote:
I tested again using the DevArt dbExpress driver for Oracle version 6.4.7 with Delphi XE6.
Jeff Chojnacki

Posts: 5
Registered: 5/4/02
Re: dbexpress compatible with Oracle 12c?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 12, 2014 11:46 AM   in response to: Jeff Chojnacki in response to: Jeff Chojnacki
I created a simple test case with Delphi XE6 to show the problem. This can be converted to use the Delphi dbExpress driver or FireDAC.
unit ufrmMain;
 
interface
 
uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Data.SqlExpr, Vcl.StdCtrls, DBXDevartOracle,
  Data.DBXOracle;
 
type
  TForm1 = class(TForm)
    btnThreaded: TButton;
    btnMainThread: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    eDatabase: TEdit;
    eUserName: TEdit;
    ePassword: TEdit;
    procedure btnThreadedClick(Sender: TObject);
    procedure btnMainThreadClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure ConnectionTest;
  end;
 
var
  Form1: TForm1;
 
implementation
 
{$R *.dfm}
 
//  Program Use:
 
//Using the DevArt dbExpress driver 6.4.7.0 or higher in the same folder as this application,
// run this program on a system that has the Oracle 12.1.0 thick client installed
// against an Oracle 11g or Oracle 12c database.
//Fill in the connection information to your database.
//Run Task manager or Process Explorer and configure it to display handles.
//When clicking on the Main Thread Connection button the program connects to the database
// on the main thread.  This should not leak any threads or handles.
//When clicking on the Threaded Connection button the program connects to the database
// using a anonymous thread
 
procedure TForm1.ConnectionTest;
var
  sc :TSQLConnection;
begin
  sc := TSQLConnection.Create(nil);
  sc.DriverName := 'DevartOracle';
  sc.Params.Values['DATABASE'] := eDatabase.Text;
  sc.Params.Values['User_Name'] := eUserName.Text;
  sc.Params.Values['Password'] := ePassword.Text;
  sc.Connected := True;
  Sleep(1000);
  sc.Connected := False;
  sc.Free;
end;
 
procedure TForm1.btnMainThreadClick(Sender: TObject);
begin
  ConnectionTest;     //Does not leak handles with Oracle 12.1.0 client.
end;
 
procedure TForm1.btnThreadedClick(Sender: TObject);
begin
  TThread.CreateAnonymousThread(ConnectionTest).Start;  //Leaks 9 mutex handles with Oracle 12.1.0 client.
end;


Edited by: Jeff Chojnacki on Dec 12, 2014 11:47 AM
quinn wildman

Posts: 856
Registered: 12/2/99
Re: dbexpress compatible with Oracle 12c? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2014 9:14 AM   in response to: Jeff Chojnacki in response to: Jeff Chojnacki
Note that this is not a forum to report bugs. The Quality Portal at
http://quality.embarcadero.com is your best venue. You can also use
Quality Central if you wish.

A few suggestions here:
* If you are using an unsupported version of Oracle (IOW our DBExpress
driver with Oracle 12), it will not be fixed.
* Be sure to test with our DBExpress driver. If the problem is only
occurs with the Devart DBExpress driver, then it would be a test case error.

Jeff Chojnacki wrote:
I created a simple test case with Delphi XE6 to show the problem.
Jeff Chojnacki

Posts: 5
Registered: 5/4/02
Re: dbexpress compatible with Oracle 12c? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2014 11:33 AM   in response to: quinn wildman in response to: quinn wildman
I spent the weekend and created a test program in Java and I can reproduce the same handle leak with it. There is still more to figure out but, thankfully it's not a Delphi related issue.

quinn wildman wrote:
A few suggestions here:
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02