BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

damn...connection pooling...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Vlad Gonchar
Guest





PostPosted: Wed Dec 10, 2003 10:44 pm    Post subject: damn...connection pooling... Reply with quote



There is the scenario.
1. I have a database A in MS SQL Server.
2. I connect there to verify my credentials and disconnect - I am good.
3. I login as other powerful enough user with default database Master and
issue SQL command DROP DATABASE A using TADOQuery.
4. ... and I am getting error saying that it cannot be deleted because there
are
other connection active to this database.

If I delay 60 sec (default SPTimeout) before trying to delete - everything
is OK.

What to do if I cannot wait this timeout ?

I'd want to disconnect other connections and delete the database. How to do
it?


Back to top
David Smith
Guest





PostPosted: Thu Dec 11, 2003 3:17 am    Post subject: Re: damn...connection pooling... Reply with quote



Brian Bushay TeamB wrote:

Quote:
There is the scenario.
1. I have a database A in MS SQL Server.
2. I connect there to verify my credentials and disconnect - I am good.
3. I login as other powerful enough user with default database Master and
issue SQL command DROP DATABASE A using TADOQuery.
4. ... and I am getting error saying that it cannot be deleted because there
are
other connection active to this database.

If I delay 60 sec (default SPTimeout) before trying to delete - everything
is OK.

What to do if I cannot wait this timeout ?


You will have to disable connection pooling

add this to your connectionstring
"OLE DB Services = -2;"

Isn't there any way to disable the pool with some command at runtime
when you're about to drop the database ? It seems not to be an ideal
solution to disable it altogether in the connection string.

David

Back to top
Vitali Kalinin
Guest





PostPosted: Thu Dec 11, 2003 10:13 am    Post subject: Re: damn...connection pooling... Reply with quote



use <you_db_name>

alter database <you_db_name> set SINGLE_USER with ROLLBACK IMMEDIATE

use master

drop database <you_db_name>

"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> ???????/???????? ? ????????
?????????: news:abmftv8f3elnc626qojruss5ita0pg1iq8 (AT) 4ax (DOT) com...
Quote:
There is the scenario.
1. I have a database A in MS SQL Server.
2. I connect there to verify my credentials and disconnect - I am good.
3. I login as other powerful enough user with default database Master and
issue SQL command DROP DATABASE A using TADOQuery.
4. ... and I am getting error saying that it cannot be deleted because
there
are
other connection active to this database.

If I delay 60 sec (default SPTimeout) before trying to delete -
everything
is OK.

What to do if I cannot wait this timeout ?

You will have to disable connection pooling

add this to your connectionstring
"OLE DB Services = -2;"
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.