Groups | Blog | Home
all groups > sql server connect > june 2005 >

sql server connect : Is there any way to know any user Connect / Disconnect from the SQL Server?


SOHO
6/16/2005 12:00:00 AM
Hi All,

Is there any way to know any user Connect / Disconnect from the SQL Server?
Such as: In any kind of "Method" OR "Event Log"


--
Thanks !


SOHO
6/16/2005 12:00:00 AM
sorry!

--
Thanks !


"Jens Süßmeyer" <Jens@Remove_this_For_Contacting.sqlserver2005.de> ¼¶¼g©ó¶l¥ó·s»D:OoNXjDmcFHA.2288@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view]

Mike Hodgson
6/16/2005 12:00:00 AM
From SQL Enterprise manager you can enable logging for all logins (both
failed & successful) in the Server Properties dialog box (Security tab,
Security group box, Audit level radio button group). This will cause
SQL Server to write messages to the SQL errorlog every time a user
connects to the SQL server (whether it's a successful or failed login
attempt). But that won't tell you anything about logouts (i.e.
disconnects).

Probably the best way to monitor this stuff is with SQL Profiler. You
can enable the 'Security Audit|Audit Login', 'Security Audit|Audit Login
Failed' & 'Security Audit|Audit Logout' events. You can get profiler to
write its trace data to a file or a SQL table so that you can query
against that data at a later time.

That would be about as close to an "event log" containing both logout &
login information that you can get your hands on. There's no way,
without altering the SQL Server binaries, to hook into the login/logout
event of a SQL server.

BTW, you ought to try to restrict your post to one or, at most, two
newsgroups.

--
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@mallesons.nospam.com |* W* http://www.mallesons.com



[quoted text, click to view]
Jens Süßmeyer
6/16/2005 12:47:36 PM
You can switch on the logging for valid / invalid /all logons for the
registry. Its located under the properties of the Server in the EM, Tab
Security.

--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
"SOHO" <hkwin2000@hotmail.com> schrieb im Newsbeitrag
news:u2Grt$lcFHA.3184@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

Jens Süßmeyer
6/16/2005 12:48:07 PM
Please do not crosspost.

--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
"SOHO" <hkwin2000@hotmail.com> schrieb im Newsbeitrag
news:u2Grt$lcFHA.3184@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button