January 11, 2007 at 1:56 pm
Hello,
How can we move DBCC result to a table for later analysis?
If I were to move the content of DBCC SHOWCONTIG to a table for later analysis?
The command INSERT INTO A table
DBCC SHOWCONTIG does not work?
Any idea?
Tha nks
January 11, 2007 at 2:48 pm
You can insert, but only the DBCCs that return a single result set. Some return multiple result sets, some just return messages.
For ShowContig this should work
Insert into ....
EXEC('DBCC ShowContig (''HumanResources.Employee'') WITH TABLERESULTS')
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
January 11, 2007 at 5:21 pm
Thanks
January 12, 2007 at 9:08 am
You can use the optional "with tableresults" in the DBCC command.
Here is an example:
create table [#waitstats]
(
[wait type] varchar(80) not null,
[requests] bigint not null,
[wait time] numeric(20, 5) not null,
[signal wait time] numeric(20, 5) not null,
[now] datetime not null default getdate()
)
insert into [#waitstats]([wait type], [requests], [wait time], [signal wait time])
exec ('dbcc sqlperf(waitstats) with tableresults, no_infomsgs')
January 12, 2007 at 10:50 am
Thanks for the info. Can you please tell me where can I find out more about
DBCC SQLPERF(WAITSTATS) . I was not able to obtain any information in term of undersdanding what does this command exactly accomplishe.
Thanks much
January 13, 2007 at 3:35 pm
Farhad,
Refer the below link . u'll get some information abt ....
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply