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 ....
http://www.sqldev.net/articles/dbcc_sqlperf_waitstats.htm
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy