• Sue_H - Tuesday, January 9, 2018 6:44 AM

    With dm_db_index_physical_stats, specifying default, null or 0 uses the current database.

    NULL, 0 or DEFAULT returns data for all databases on the instance.
    https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql

    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