Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.