Solved

sql trace activity for a database

Posted on 2012-03-28
3
462 Views
Last Modified: 2012-04-25
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
Comment
Question by:sqlserverdba
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 500 total points
ID: 37780494
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
 
LVL 1

Author Comment

by:sqlserverdba
ID: 37781736
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
 
LVL 23

Assisted Solution

by:Saqib Khan
Saqib Khan earned 500 total points
ID: 37783321
above is exactaly what you need...did you try the DatabaseID filter instead (as suggested above)
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question