Advertisement
SQLSoldier

Untitled

Sep 8th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.43 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement