Checking Consistency of the Database 

Use

A database consistency check performs a thorough check of the entire database. It examines all tables in the database to find out whether index and data pages are correctly linked and indexes are in proper sorted order. It also checks that all pointers are consistent and that the data information on each page, and page offsets are reasonable. It enables the early recognition of problems and thus prevents problem escalation and possible loss of data.

Schedule the consistency checks with the R/3 Planning Calendar. Checks should run at the weekend when you have time. When the check runs, no other task should be scheduled.

At the SQL Server level, the R/3 database consistency check executes the DBCC CHECKDB command. This typically locks user tables, indexes and system tables when running. In addition, it is very I/O intensive and should therefore not be run during normal operation, but a times when the system load is low.

For more information, see R/3 Note 142731 DBCC Checks for SQL Server 7.0

Procedure

  1. Start the R/3 Planning Calendar with Administration ® CCMS ® DB Administration ® DBA Planning Calendar.
  2. Alternatively enter the transaction code DB13.

  3. Double-click on the header of the day on which you want to schedule the consistency check.
  4. If actions have already been scheduled on the chosen day, these are displayed.

    If not, a list of the actions you can schedule is displayed.

  5. Choose Check database consistency from the list of actions that can be performed. If actions have already been scheduled on the day, you have to choose Insert to access this list.
  6. Enter the time when the check is to start and, if required, the period in which it is to be repeated. Confirm your entries with OK.
  7. The database consistency check is now scheduled. It is entered in the calendar and visible on the days when it will be executed.

  8. When the check has completed, you can find out whether it ran successfully in the Planning Calendar. If it is highlighted in red, inconsistencies were discovered or errors were generated during the execution of the check. To find out more, double-click on the task.
  9. The SQL DB Administration in the SAP Environment window opens. It displays information about the task and gives a short overview of the task history. The task log is displayed.

    Error messages for the DBCC check are also written to the file
    \MSSQL7\ CCMS_CHECKDB_HIST.TXT. If errors occurred, always look at this file because it contains all messages generated and is easier to read than the list of errors in the Planning Calendar.

  10. Some error information is also recorded in the NT Error Log. To locate the information in the log, look for SQL Server and SQL Executive entries made at the time the task ran.
  11. If any errors are discovered, contact your Basis Consultant for support. Errors must be corrected immediately. If they are left, they can lead to serious errors in your system.

To find out how to change scheduled actions see:

Working with the R/3 Planning Calendar