| View previous topic :: View next topic |
| Author |
Message |
Vlad Gonchar Guest
|
Posted: Wed Dec 10, 2003 10:44 pm Post subject: damn...connection pooling... |
|
|
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
|
Posted: Thu Dec 11, 2003 3:17 am Post subject: Re: damn...connection pooling... |
|
|
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
|
Posted: Thu Dec 11, 2003 10:13 am Post subject: Re: damn...connection pooling... |
|
|
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 |
|
 |
|