Hello experts!

How can i`m emulate dinamicaly, for example, 100 user connections to Oracle DB using DOA?

Best regards.
Who is Participating?
CayceConnect With a Mentor Commented:
Are you using the DOA components from allroundautomations ? (It looks like to me)

Please let me know so I relate to the proper documentation.

I like the Delphi DOA components from SourceForge (due their open source nature), and I've never used the allroundautomation ones (which look ok! and they are cheap too).

The current version of the DOA I could find is 4.05. As far as I could look into the documentation you can create multiple instances of a TOracleSession.
From DOA 4.05 documentation:
"You use the TOracleSession component to connect to an Oracle database and to control transactions. You can use many sessions simultaneously, accessing different databases."

There's plenty of examples and documentation on these components in this package:

What I would suggest doing (if you're using these components) is:
1) Create a thread that starts up it's own TOracleSession that runs transactions against the database. Logon to the database. Create a TOracleQuery component and then assign the Session property, now execute Querys until the thread is asked to stop.

Something like this:

#include <Oracle.hpp>

class MyThread : public TThread {
  TOracleSession* Session;
  TOracleQuery* Query;
  __fastcall MyThread(TComponent* Owner) {
    Session = new TOracleSession(Owner);
    Query = new TOracleQuery(Owner);
  void __fastcall ~MyThread() {
    delete Query;
    delete Session;
  void __fastcall Startup() {
    Session->LogonUsername = "DBA";
    Session->LogonPassword = "DBA";
    Session->LogonDatabase = "PerformanceTest";
    Session->Pooling = spNone;
    try {
    } catch(EOracleError &e) {
      // do something
    Query->Session = Session;
  void __fastcall Cleanup() {
  void __fastcall RunQuery() {
    static int QueryIndex = 0;
    static const int    NumQueries = 3;
    // these files contain the SQL statement
    static const String Queries[NumQueries] = { "query1.sql", "query2.sql", "query3.sql" };
    if(Session->Connected) {
      if(QueryIndex == NumQueries)
        QueryIndex = 0;
      // if the query has some variables, modify the Variable property
      // do something with the query data (if query is a SELECT statement)
  void __fastcall Execute() {
    while(!Terminated)  {
1) get the Delphi Direct ORACLE Access Components from:
2) create a new package in BCB6, put every .pas file found on the "src" folder of the delphioci project
3) add the DesignIntf.pas file to the package (it's fund under $(BCB)/Source/ToolsAPI)
4) build and install the package. This will give you the new following components:
  TAMemoryDataset, TAOraSQL, TAOraUpdateSQL, TMemoryDataset, TOraDB, TOraSQL
  they will all be under the "Data Access" toolbar
5) documentation for all these components is found on the "doc" folder of the delphioci package
6) Now you just need to create an application that makes about 20 threads, each with it's own connection, running a serie of transactions against the oracle database (and harvesting performance data on the way), then distribute your resulting application into several computers (5 or so), and run them all at once.

There you go, a DOA client load simulator.

Good Luck!
GDEAuthor Commented:
I`m have DOA v. installed on my computer.
Can i`m dynamically create oracle session (TOralceSession)?
have you any example?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.