• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

sql trace activity for a database

how can I trace anything connecting to a database abc... I started a default trace and added a filter database name 'abc'. However, I run a select and it doesn't return anything in the trace.
Additionally, is it possible to exclude sql service account also.?

Please let me know the events and the filters that are required to identify activity in a database, excluding events from the sql service account.
0
sqlserverdba
Asked:
sqlserverdba
  • 2
2 Solutions
 
Saqib KhanSenior DeveloperCommented:
Under Trace properties > Events Selection tab > select show all columns. Now under column filters, you should see the database name. Enter the database name for the Like section and you should see traces only for that database.

You can also try by databaseID:
SELECT [name],[dbid] FROM [master].[dbo].[sysdatabases] ORDER BY [name]
0
 
sqlserverdbaAuthor Commented:
That was what I tried and then ran a select against a table in the database and it did not show in the trace.. so I wanted to know what events and what filters I need.
0
 
Saqib KhanSenior DeveloperCommented:
above is exactaly what you need...did you try the DatabaseID filter instead (as suggested above)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now