Home All Groups Group Topic Archive Search About

Is there a way to repress DBCC row counts?

Author
30 Jun 2005 4:42 PM
BDB
Hi,

I'm using DBCC like this:

SET NOCOUNT ON

DBCC ... WITH NO_INFOMSGS

And I still get a row count.  How to I repress the row count?

Thanks,
Bryan

Author
30 Jun 2005 7:33 PM
David Gugick
BDB wrote:
> Hi,
>
> I'm using DBCC like this:
>
> SET NOCOUNT ON
>
> DBCC ... WITH NO_INFOMSGS
>
> And I still get a row count.  How to I repress the row count?
>
> Thanks,
> Bryan

You would need to dump the results to a temp table, assuming the DBCC
command you are using support the WITH TABLERESULTS option. For example:

create table #opentran(item varchar(128), description varchar(128))

Insert into #opentran
Exec ('dbcc opentran(''pubs'') with tableresults')

select * from #opentran

drop table #opentran



--
David Gugick
Quest Software
www.imceda.com
www.quest.com
Author
30 Jun 2005 8:43 PM
BDB
Show quote
"David Gugick" <david.gugick-nospam@quest.com> wrote in message
news:uRjFEqafFHA.2156@TK2MSFTNGP14.phx.gbl...
> BDB wrote:
>> Hi,
>>
>> I'm using DBCC like this:
>>
>> SET NOCOUNT ON
>>
>> DBCC ... WITH NO_INFOMSGS
>>
>> And I still get a row count.  How to I repress the row count?
>>
>> Thanks,
>> Bryan
>
> You would need to dump the results to a temp table, assuming the DBCC
> command you are using support the WITH TABLERESULTS option. For example:
>
> create table #opentran(item varchar(128), description varchar(128))
>
> Insert into #opentran
> Exec ('dbcc opentran(''pubs'') with tableresults')
>
> select * from #opentran
>
> drop table #opentran
>

This works.  Thank you!
Author
30 Jun 2005 7:34 PM
Ravi
I don't think you can supress row count in DBCC output
--
Thanks
Ravi


Show quote
"BDB" wrote:

> Hi,
>
> I'm using DBCC like this:
>
> SET NOCOUNT ON
>
> DBCC ... WITH NO_INFOMSGS
>
> And I still get a row count.  How to I repress the row count?
>
> Thanks,
> Bryan
>
>
>

AddThis Social Bookmark Button