Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need help on writing a server-side trace to check logins to try to determine if and when vendor accounts are used. The purpose is to remove sa access. These accounts sure have sa but I need to figure out if I could give them the least permission required to do the job.

share|improve this question

The easiest way is to create the needed trace from the SQL Profiler tool and then save it as SQL script. Put this saved script inside an sql job, as a step, and schedule it for once daily run (at midnight). Don't forget to set your trace to save to files somewhere. You will have daily trace saved that you'll be able to select by queries or manually.

You can find some details in the answer of this question: Using SQL Profiler on a database that's in production, especially the article of automating server side tracing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.