简体   繁体   中英

How to identify database in SQL Server Profiler?

In the SQL Server Profiler, I've added a filter for:

DatabaseName Like MyDatabase

I then log into the same server and run:

select * from MyDatabase

I don't see any entries in the Profiler. I remove the above filter and run the statement again. It shows up in the Profiler.

Any idea why it isn't working with the filter?

Also, is there a way to filter on three databases? In other words, I want to see execution against three databases.

On the Events Selection tab of the Trace Properties window, hit the "Column Filters..." button and click on DatabaseName. From here you can filter to your database(s). If you double click on the "Like" group after entering your first database name, it will add another blank spot to enter a new name.

When you start a new trace, click the Event Selection tab and then click the "Show All Columns" checkbox. Then, scroll the window until you see the column "Database Name", and check all of the checkboxes there. 跟踪属性

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM