Is it possible to insert the data from the DBCC output?
Yes, it's possible. Below are the conditions to achieve it.
1. Considering am taking the DBCC command DBCC log('master',0)
2. I need to push it to a table. So that, I can play around with the data available.
3. Make the command into a dynamic sql using exec command.
4. Create a table with similar structure as the output of the command.
5. Push the data through insert statement. Below is the query sample to achieve it.
create table dbcc_insert_Table(CurrentLSN varchar(100),Operation varchar(100),
contaxt varchar(100), transactionId varchar(100),logblock int)
insert dbcc_insert_Table
exec('dbcc log (''master'',0)')
All the records from the DBCC output will be pushed into the newly created table.
Cheers,