SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 SA login usage tracking
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ITTrucker
Yak Posting Veteran

USA
54 Posts

Posted - 01/22/2013 :  10:28:40  Show Profile  Reply with Quote
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

USA
37296 Posts

Posted - 01/22/2013 :  13:52:50  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

Romania
35 Posts

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

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2076 Posts

Posted - 01/27/2013 :  02:17:59  Show Profile  Visit jackv's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000