Why would you want to disable connection pooling? I
can't think of a reason and was curious why you are
disabling it.
Thanks,
James
Connection pooling will hold a connection open even
though you specifically opted to close it, for X amount
of seconds, then it closes it. There might be situations
when you might want to have an
"always-connected" application, in
which case you would want to have complete control over
your connections, and usually one that is open at all
times.
Persoanlly I never needed diasbling yet, but , being the
control freak that I am, When I see an "On by
default" flag, it annoys me to not know hot to
turn it off... :)
Thanks. I absolutely need it because when converting
databases, the caching really mucks things up.
I'm disabeling OLE DB connection pooling because I want
to get a view wether all our connections are being
closed after useage... MS doesn't have OLE DB connection
performance counters for this...
IN order to drop a database, all connections must be
closed. As part of application set-up and maintenance, I
frequently need to drop databases. You can't drop and
recreate a merge subscription if connections are holding
it open.
If you're looking for an easy way to kill all open
processes on a given database, try this:
Dim srv As New SQLDMO.SQLServer2
srv.LoginSecure = False
srv.Connect [server], [username], [password]
Dim res As QueryResults2
Set res = srv.EnumProcesses
Dim i As Integer, dbname As Integer, spid As Integer
For i = 1 To res.Columns
' Get the index of the dbname column
If res.ColumnName(i) = "dbname" Then
dbname = i
If res.ColumnName(i) = "spid" Then
spid = i
Next i
Dim rowcount As Integer: rowcount = 0
For i = 1 To res.Rows
If res.GetColumnString(i, dbname) = [database name] Then