Board index » delphi » Abnormal number of database attachments

Abnormal number of database attachments

I have a very simple program that opens 10 tables (I'using IBX - TIBQuery
components), closes it and terminates.
The program opens and closes the tables very fast but hangs up during the
shut down phase. I have found that after the opening of the tables the
number of the attachments to the database increases and remains high for a
(relative) long time. If I try to close the program then the program hangs
up
until the attachments are presents.
If I close the connection (TIBDatabase.Connected := False) before shutting
down the program, then the program terminates normally but the attachments
to the database are still presents and until this are presents i cannot
re-run the program.
I have this problem only with a specific database, i have tried to do a
backup/restore but the problem persists.
The database is not too big (110 tables) but i perform very intensive batch
operations.

What am I doing wrong?

TIA

sergio sette

 

Re:Abnormal number of database attachments


Quote
Sergio Sette wrote:

> I have a very simple program that opens 10 tables (I'using IBX - TIBQuery
> components), closes it and terminates.
> The program opens and closes the tables very fast but hangs up during the
> shut down phase. I have found that after the opening of the tables the
> number of the attachments to the database increases and remains high for a
> (relative) long time.

        What do you mean by "attachments?"  Are you using multiple
TIBDatabases?  

        BTW, the best place for this question is
borland.public.delphi.database.interbaseexpress.

        HTH,

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Abnormal number of database attachments


Quote

> What do you mean by "attachments?"  Are you using multiple
> TIBDatabases?

No onle one TIBDatabase and TIBTransaction.
I use "attachments" because is used in the interbase server properties :

Number of attachments : xx
Number of databases : yy

I don't know wath this means : active transactions ? Open cursors ?

Quote

> BTW, the best place for this question is
> borland.public.delphi.database.interbaseexpress.

I'm sorry for the cross-post but i'm not sure if this is a IBX problem or a
IB one.

Regards

Sergio Sette

Re:Abnormal number of database attachments


Quote
Sergio Sette wrote:

> > What do you mean by "attachments?"  Are you using multiple
> > TIBDatabases?

> No onle one TIBDatabase and TIBTransaction.
> I use "attachments" because is used in the interbase server properties :

> Number of attachments : xx
> Number of databases : yy

> I don't know wath this means : active transactions ? Open cursors ?

        In IBX terms this means TIBDatabase connections.

        It's hard to say what's causing this without knowing more about what
you're doing.  At the start of your message you say that you open and
close 10 queries, but at the bottom you talk about "very intensive batch
operations."  What are you doing?  How often do you do hard commits?  Is
your program multithreaded?

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Abnormal number of database attachments


Quote

> In IBX terms this means TIBDatabase connections.

I use only one TIBDatabase and a TIBTransaction component but every query
seems to open 2 database connections !! Is this possible ?

Quote

> It's hard to say what's causing this without knowing more about what
> you're doing.  At the start of your message you say that you open and
> close 10 queries, but at the bottom you talk about "very intensive batch
> operations."  What are you doing?  How often do you do hard commits?  Is
> your program multithreaded?

On the same database other programs performs batch operations, however when
i run my test program no other programs are running.
My test program is a very simple program that only opens and closes 10
queries. I have tried to debug it and if i stop it after opening the 10
queries then the number of connections becomes high (this takes 1 min.) and
then decreases fast to two.
The problem seems to be related to this specific database because i have
tried with other databases and i cannot reproduce the problem.

Do you have any idea ?

Regards

Sergio Sette

Re:Abnormal number of database attachments


Quote
Sergio Sette wrote:

> > In IBX terms this means TIBDatabase connections.

> I use only one TIBDatabase and a TIBTransaction component but every query
> seems to open 2 database connections !! Is this possible ?

        No.

Quote
> Do you have any idea ?

        Is your program multithreaded or do you use an RDM?

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Abnormal number of database attachments


Quote

> Is your program multithreaded or do you use an RDM?

No.

Regards

Sergio Sette

Other Threads