Listing 4: Code to Run a Fragmentation Report on a Snapshot USE AdventureWorks_snapshot SELECT * FROM sys.dm_db_index_physical_stats (DB_ID(N'AdventureWorks_snapshot'), object_id(N'Sales.SalesOrderHeader'), null, null, 'DETAILED')