sp_iqcheckdb Output

The output of sp_iqcheckdb consists of an extensive list of statistics and any errors reported by DBCC.

Only non-zero values are displayed. Lines containing errors are flagged with asterisks (*****). Note that if you encounter errors, some of the statistics reported by DBCC may be inaccurate.

The output of sp_iqcheckdb is always copied to the IQ message file (.iqmsg). To redirect the sp_iqcheckdb output to a file, enter the following command:
sp_iqcheckdb ># file_name

where file_name is the name of the file to receive the output.

When the DBCC_LOG_PROGRESS option is ON, sp_iqcheckdb sends progress messages to the IQ message file. These messages allow the user to follow the progress of the sp_iqcheckdb procedure as it executes.

The following is sample progress log output of the command sp_iqcheckdb 'check database'
IQ Utility Check Database
Start CHECK STATISTICS table: tloansf
Start CHECK STATISTICS for field: aqsn_dt
Start CHECK STATISTICS processing index:
ASIQ_IDX_T444_C1_FP
Start CHECK STATISTICS processing index: 
tloansf_aqsn_dt_HNG
Done CHECK STATISTICS field: aqsn_dt

Future Version Errors

If you see the message DBCC Future Version Errors, a DDL operation has been performed since the DBCC transaction began. DBCC continues to process the remaining tables, but leaked block checking is not performed and statistics do not include the tables that were skipped.

To avoid DBCC Future Version errors, execute the COMMIT command before you run sp_iqcheckdb.

The following DBCC output indicates a Future Version error:
==============================|===================|=====
DBCC Verify Mode Report       |                   | 
==============================|===================|=====
** DBCC Future Version Errors |1                  |*****

Sample Output of Valid Database

The following is an example of running sp_iqcheckdb in verify mode. No errors are detected, there is no leaked space, the database allocation is consistent, and all indexes are consistent.

The command line for this example is sp_iqcheckdb 'verify database'. Note that DBCC verifies all indexes, but the index verification output shown here is abbreviated.

Each index that DBCC determines to be consistent is marked as verified in the result set.

      Stat                       Value                      Flags
========================|==================================|=====
DBCC Verify Mode Report |                                  | 
========================|==================================|=====
   DBCC Status          |No Errors Detected                |
   DBCC Work units      |                                  |
   Dispatched           |75                                | 
   DBCC Work units      |                                  |
   Completed            |75                                | 
========================|==================================|=====
Index Summary           |                                  | 
========================|==================================|=====
   Verified Index Count |86                                | 
========================|==================================|=====
Allocation Summary      |                                  | 
========================|==================================|=====
   Blocks Total         |8192                              | 
   Blocks in Current    |                                  |
   Version              |4855                              |                             
   Blocks in All        |                                  |
   Versions             |4855                              | 
   Blocks in Use        |4855                              | 
   % Blocks in Use      |59                                | 
========================|==================================|=====
Allocation Statistics   |                                  | 
========================|==================================|=====
   DB Extent Count      |1                                 | 
   Blocks Created in    |                                  |
   Current TXN          |211                               | 
   Blocks To Drop in    |                                  |
   Current TXN          |212                               | 
   Marked Logical       |                                  |
   Blocks               |8240                              | 
   Marked Physical      |                                  |
   Blocks               |4855                              | 
   Marked Pages         |515                               | 
   Blocks in Freelist   |126422                            | 
   Imaginary Blocks     |121567                            | 
   Highest PBN in Use   |5473                              | 
   Total Free Blocks    |3337                              | 
   Usable Free Blocks   |3223                              | 
   % Total Space        |                                  |
         Fragmented     |1                                 | 
   % Free Space         |                                  |
         Fragmented     |3                                 | 
   Max Blocks Per Page  |16                                | 
   1  Block Page Count  |104                               | 
   3  Block Page Count  |153                               | 
   ...                  |                                  |
   16 Block Hole Count  |199                               | 
========================|==================================|=====
Index Statistics        |                                  | 
========================|==================================|=====
   ...
   Verified Index       |fin_data.DBA.ASIQ_IDX_T209_C3_HG  | 
   Verified Index       |fin_data.DBA.ASIQ_IDX_T209_C4_FP  | 
   Verified Index       |product.DBA.ASIQ_IDX_T210_C1_FP   | 
   ...
   Verified Index       |employee.DBA.ASIQ_IDX_T212_C20_FP | 
   Verified Index       |iq_dummy.DBA.ASIQ_IDX_T213_C1_FP  | 
   FP Indexes Checked   |68                                | 
   HNG Indexes Checked  |1                                 | 
   HG Indexes Checked   |17                                | 
========================|==================================|=====
   ...

The DBCC output also contains extensive statistical information grouped under headings such as Container Statistics, Buffer Manager Statistics, catalog Statistics, Connection Statistics, and Compression Statistics. You can see an example of the available statistics by executing the command sp_iqcheckdb 'verify database' after connecting to the SAP Sybase IQ demonstration database iqdemo.