Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBCC SHOWCONTIG OUTPUT TO TABLE 1

Status
Not open for further replies.

icemel

MIS
Oct 17, 2005
463
US
Hi,

I think I may have asked this before, and was given an answer, but I've misplaced the syntax.

I would like to output DBCC SHOWCONTIG to a table.

I am mainly interested in being able to select table name based on scan density.

Thank you
 
Paerts of this example is copied from BOL
CREATE TABLE #fraglist (
ObjectName CHAR (255),
ObjectId INT,
IndexName CHAR (255),
IndexId INT,
Lvl INT,
CountPages INT,
CountRows INT,
MinRecSize INT,
MaxRecSize INT,
AvgRecSize INT,
ForRecCount INT,
Extents INT,
ExtentSwitches INT,
AvgFreeBytes INT,
AvgPageDensity INT,
ScanDensity DECIMAL,
BestCount INT,
ActualCount INT,
LogicalFrag DECIMAL,
ExtentFrag DECIMAL)

insert into #fraglist
exec ('dbcc showcontig (''publishers'') with tableresults')
select * from #fraglist

Denis The SQL Menace
SQL blog:
Personal Blog:
 
aha - if only i would have scrolled down further!

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top