• 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

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass