SQL profiler Filter

Posted on 2010-08-18
Last Modified: 2012-05-10
I want to make a trace on my MS SQL 2005 server to be able to see if one specific database still in used by external software.

I know how to filter on the database itself  (Filter on "Database name")
I know how to filter on the Cross database query (filter on "Text data")

how can I create a trace filter whit a "OR" between two filter.

Where [Database Name] = 'xxx' or [TextData] = 'xxx'

Question by:Cboudroz
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
  • 3
  • 2

Accepted Solution

Alpha Au earned 250 total points
ID: 33473106
i cannot found or between two filter.

how about opening two trace and log the result the two db table,

and then select the union result from the two tables?
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 33474761
If you only want to know if a database is in use why don't you capture only "Audit Login" event?

Author Comment

ID: 33474793

I think it's the only solution available


what about the cross database query made from another database?  
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

LVL 50

Expert Comment

by:Vitor Montalvão
ID: 33474830
You have information about the user, host and application in the Audit Login event. So I think you won't need nothing else.

Author Comment

ID: 33476205

I don't want to see if application connect to the server but if query goes in a specific DB.  Audit Login don't give any info about database connection and don't give me any info about cross database query.


event if you didn't really help me the point goes to you!

Author Closing Comment

ID: 33476227
no solution look available for "OR" filter, I will used two seperate Trace.


Featured Post

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to import SQL 2000 database to SQL 2014 5 181
Urgent help needed! Unable to to paste in query designer 29 57
Sql query 107 101
SQL query 7 49
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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