Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    6

    Unanswered: Number of connections to a database

    Is there any way to know the number of current connections to an SQL Server Database? Also how can one change the max pool size (for the number of connections allowed to the database)?

    Thanks.

  2. #2
    Join Date
    Oct 2003
    Location
    Montevideo, Uruguay, South America
    Posts
    13

    Re: Number of connections to a database

    FROM Books ONLINE
    -----------------------------
    @@CONNECTIONS
    Returns the number of connections, or attempted connections, since Microsoft® SQL Server™ was last started.

    Syntax
    @@CONNECTIONS

    Return Types
    integer

    Remarks
    Connections are different from users. Applications, for example, can open multiple connections to SQL Server without the user observing the connections.

    To display a report containing several SQL Server statistics, including connection attempts, run sp_monitor.

    Examples
    This example shows the number of login attempts as of the current date and time.

    SELECT GETDATE() AS 'Today's Date and Time',
    @@CONNECTIONS AS 'Login Attempts'

    Here is the result set:

    Today's Date and Time Login Attempts
    --------------------------- ---------------
    1998-04-09 14:28:46.940 18


    See Also

    Configuration Functions

    sp_monitor

    ©1988-2000 Microsoft Corporation. All Rights Reserved.



    -------------------------------
    Originally posted by Big Bubba
    Is there any way to know the number of current connections to an SQL Server Database? Also how can one change the max pool size (for the number of connections allowed to the database)?

    Thanks.
    Bye
    Lorena

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •