Solved

sql trace activity for a database

Posted on 2012-03-28
3
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

751 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