@@CONNECTIONS AS 'Login Attempts'

  • SELECT GETDATE() AS 'Today''s Date and Time',

    @@CONNECTIONS AS 'Login Attempts'

    shows

    72624361

    How accurate is this data? Is it really SQL Server login (success/failure) attempts

    I use sql-server connected through ADO.NET only(99%)

    1. direct login to website sqlserver and +

    2..NET ADO.NET connection

    This is my website sql-server shows this data.

    Can anyone explains ?what is this all about.

  • rockandhra.net (1/29/2013)


    SELECT GETDATE() AS 'Today''s Date and Time',

    @@CONNECTIONS AS 'Login Attempts'

    shows

    72624361

    How accurate is this data? Is it really SQL Server login (success/failure) attempts

    I use sql-server connected through ADO.NET only(99%)

    1. direct login to website sqlserver and +

    2..NET ADO.NET connection

    This is my website sql-server shows this data.

    Can anyone explains ?what is this all about.

    It is not a count of failed connection attempts. Here is the online documentation. http://msdn.microsoft.com/en-us/library/ms188915.aspx

    I don't hold much stock in the accuracy to say the least. Play around in SSMS and you will see what I mean. Run select @@connections in a query window, open a new window. It should increment by one right? It increments by 2. I just ran this on my local instance and got 98398. I know I have not made that many connection attempts today. I did nothing but wait for about 10 minutes. Ran it again and the value is 98410. It increased by 12 while my machine was idle. In other words you can't count on that to return the number of failed connection attempts.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply