Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 SA login usage tracking

Author  Topic 

ITTrucker
Yak Posting Veteran

64 Posts

Posted - 2013-01-22 : 10:28:40
While I was on vacation, my boss gave the sa password out to a couple people in our finance department. Now I have to change it for the first time in a few years (no IT turnover).

What's the best way to trace what programs are using the sa login to access the databases?

I'm guessing I could run a trace on the sa login for a day or so and that should catch most of the programs that connect, and the HostName field should tell me which PC's are connecting, but what's the best filter I can use so a 24 hour trace doesn't bog down the server?

I've run some SQL profilers to try and see what programs use it for access, but the trace fills up pretty quickly with thousands or records. We've been bad in the past with setting up 3rd party access with the sa password, trying to slowly remedy that. But now because these users have the sa password and the ability to connect to the database to run queries with the sa login, I'm panicking a bit and feel the need to change it asap.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-01-22 : 13:52:50
A trace with a filter for sa is not going to bog down the server, but alternatively you could query sysprocesses for the info say once a minute.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ovc
Starting Member

35 Posts

Posted - 2013-01-26 : 12:42:38
or you could create a logon trigger and insert the results into a table. :)
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-27 : 02:17:59
Are the users actually supposed to be logging on with sa? If not , and you feel confident you won't break the applications, why don't you change the sa password - and issue users with a logon with less privileges?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -