SHARE
TWEET

Untitled

SQLSoldier Sep 8th, 2015 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Use AdventureWorks2014;
  2.  
  3. Select OBJECT_SCHEMA_NAME(PA.object_id) + N'.' + OBJECT_NAME(PA.object_id) As ObjectName,
  4.         DF.name As FileName,
  5.         PA.allocation_unit_type_desc As TypeData,
  6.         PA.allocated_page_file_id As FileID,
  7.         PA.allocated_page_page_id As PageID
  8. From sys.dm_db_database_page_allocations(db_id(), null, 1, null, 'limited') PA
  9. Inner Join sys.database_files DF On DF.file_id = PA.allocated_page_file_id
  10. Order By PA.object_id;
RAW Paste Data
Top