Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Working with Database Objects » Working with indexes

Creating indexes Next Page

Validating indexes


You can validate an index to ensure that every row referenced in the index actually exists in the table. For foreign key indexes, a validation check also ensures that the corresponding row exists in the primary table. This check complements the validity checking performed by the VALIDATE TABLE statement.

Caution    

Validate tables or entire databases only when no connections are making changes to the database.

To validate an index (Sybase Central)
  1. Connect to the database as a DBA user or as the owner of the table on which the index is created.

  2. In the left pane, open the Indexes folder.

  3. Select the desired index and then choose File > Validate.

To validate an index (SQL)
  1. Connect to the database as a DBA user or as the owner of the table on which the index is created.

  2. Execute a VALIDATE INDEX statement.

  3. To validate an index (command line)
    1. Open a command prompt.

    2. Run the dbvalid utility.

    3. Examples

      Validate an index called EmployeeNames. If you supply a table name instead of an index name, the primary key index is validated.

      VALIDATE INDEX EmployeeNames;

      Validate an index called EmployeeNames. The -i option specifies that each object name given is an index.

      dbvalid -i EmployeeNames

      For more information, see VALIDATE statement, and Validation utility (dbvalid).