Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql trace activity for a database

Posted on 2012-03-28
3
Medium Priority
?
468 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 1500 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 1500 total points
ID: 37783321
above is exactaly what you need...did you try the DatabaseID filter instead (as suggested above)
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

670 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