2

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.

Nick Chammas
  • 14,810
  • 17
  • 76
  • 124
db7
  • 1,371
  • 4
  • 16
  • 20

1 Answers1

2

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.

Marian
  • 15,741
  • 2
  • 62
  • 75