LISTING 3: Harnessing xp_cmdshell to Route the Result Set Data
/* Create a table we can use to capture DBCC output. */
create table tempdb..DBCCOutput ( id int identity, output
    varchar(255) null)
GO

/* Populate our table. */
insert tempdb..DBCCOutput (output)
EXEC master..xp_cmdshell 'isql /d pubs -Q"dbcc checkdb" -E'
GO

 /* Look at the output. */
select * from tempdb..DBCCOutput 
GO