SQL profiler Filter

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'


Thanks,
LVL 7
CboudrozAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Alpha AuConnect With a Mentor Commented:
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?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
If you only want to know if a database is in use why don't you capture only "Audit Login" event?
0
 
CboudrozAuthor Commented:
alphaau:

I think it's the only solution available

VMontalvao:

what about the cross database query made from another database?  
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You have information about the user, host and application in the Audit Login event. So I think you won't need nothing else.
0
 
CboudrozAuthor Commented:
VMontalvao:

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.



alphaau:

event if you didn't really help me the point goes to you!
0
 
CboudrozAuthor Commented:
no solution look available for "OR" filter, I will used two seperate Trace.

thanks,
0
All Courses

From novice to tech pro — start learning today.