• GilaMonster (8/22/2014)


    Robert Frasca (8/22/2014)


    That must be the Database Name that is filtered on by Profiler rather than the fully qualified database name referenced in the query.

    That's exactly what it's doing. The DatabaseName is the database context, not any one of the possibly multiple databases referenced in the query.

    Also, some events populate the database ID but not the name, or at least they used to. Safer to filter on the database ID than name

    Or just move to extended events and get rid of all the pain.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning