Showing posts with label optionally. Show all posts
Showing posts with label optionally. Show all posts

Tuesday, February 14, 2012

Counting Connections

I have a VB6 program that uses ADO to communicate with a SQL Server database
(and an Access database optionally). Is there a way that I can tell how
many connections that there are at any one time? I'd like to do this to
Access as well if possible?
Rick Ledermanselect count(*) from master.dbo.sysprocesses
where SPID > 50
The 'where SPID > 50' restriction eliminates system connections. I have no
clue how to do this in Access.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rick Lederman" <rick@.soaringsoftware.com> wrote in message
news:e3wkopEwEHA.3808@.TK2MSFTNGP15.phx.gbl...
> I have a VB6 program that uses ADO to communicate with a SQL Server
database
> (and an Access database optionally). Is there a way that I can tell how
> many connections that there are at any one time? I'd like to do this to
> Access as well if possible?
> Rick Lederman
>|||Goeff,
Thanks, that works great, now to see if I can find how to do it in Access.
Rick
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:%23MUhVvEwEHA.1984@.TK2MSFTNGP14.phx.gbl...
> select count(*) from master.dbo.sysprocesses
> where SPID > 50
> The 'where SPID > 50' restriction eliminates system connections. I have
no
> clue how to do this in Access.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Rick Lederman" <rick@.soaringsoftware.com> wrote in message
> news:e3wkopEwEHA.3808@.TK2MSFTNGP15.phx.gbl...
> database
>|||"Rick Lederman" <rick@.soaringsoftware.com> wrote in message
news:e3wkopEwEHA.3808@.TK2MSFTNGP15.phx.gbl...
> I have a VB6 program that uses ADO to communicate with a SQL Server
database
> (and an Access database optionally). Is there a way that I can tell how
> many connections that there are at any one time?
By one instance of your application on one computer, or by all copies of
your application on all computers?

> I'd like to do this to Access as well if possible?
With VB6 and ADO you can control the number of connections in use. In
Access, if you use ADO you can also control the connection count in use.
There is absolutely no way to tell how many connections will be used (or are
being used) by Access if you are relying on Jet to manage the database
access. The query that Geoff provided will give you an idea of how many
connections are use at any given time.
Steve|||Try using a Pass-through query in Access to get the info.
-Sue
On Mon, 1 Nov 2004 15:13:53 -0500, "Rick Lederman"
<rick@.soaringsoftware.com> wrote:

>Goeff,
>Thanks, that works great, now to see if I can find how to do it in Access.
>Rick
>"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
>news:%23MUhVvEwEHA.1984@.TK2MSFTNGP14.phx.gbl...
>no
>