Option 8: Verify Table(s)

SQLM menu option 8 is used to check that all columns and indexes defined in the SQLTABLES entry for a specified table also exist in the SQLCOLUMNS and SQLINDEXES files. The verify procedure is as follows:

  1. Select option 6 from the SQLM main menu. You will be prompted:

    Define Tablenames to be Processed....
    Enter Tablename :
  2. Enter the names of the SQL tables you wish to verify. If you enter ?, a list of tables is displayed, from which you can select. See Using the SQLM Menu Options.

    SQLCOLUMNS and SQLINDEXES entries are then checked and SQLM displays a screen similar to the following:

                            SQL MAINTENANCE - Verify Table
                            ==============================
    Processing Selected Tables....
    GUESTS                                  Validates OK
    Do you wish to run "SQL VERIFY" on the table data (Y/N) :
    
    

    Any errors will be displayed on the right-hand side of the screen. For example:

                            SQL MAINTENANCE - Verify Table
                            ==============================
    Processing Selected Tables....
    GUESTS
                                            Index KEY3 missing from GUESTS entry
                                            Column ABS exists in WMDATA but is not 
                                            referenced in GUESTS
                                            Validate FAILS
    Do you wish to run "SQL VERIFY" on the table data (Y/N) :
    
    
  3. Enter N  to return to the main menu, or Y to perform additional verification using the SQL VERIFY statement.
  4. If you enter Y, the following screen is displayed:

                            SQL MAINTENANCE - Verify Table
                            ==============================
    Verify table data matches column definitions...
    
    1. Verify entire table (can take a long time)
    2. Verify table with search conditions.
         e.g. SQL VERIFY * FROM EMP WHERE DEPTNO = 12345
    
    Enter selection ( 1,2 / null ) :
    
    
  5. Enter 1  to verify the complete table (verification starts immediately), or 2 to specify search conditions.

    Note

    Specifying search conditions can greatly reduce the time taken to verify the table, but some errors may not be reported.

  6. If you enter 2, you will be prompted to enter the required SQL statement. For example:

    Enter SQL VERIFY statement for table GUESTS
    SQL VERIFY

    Complete the SQL VERIFY statement provided and then press RETURN. For example:

    Enter SQL VERIFY statement for table GUESTS
    SQL VERIFY * FROM GUESTS WHERE ROOMNO = 123
  7. When verification is complete, you will be asked if you want to perform further verification on this table. If you enter Y, you will be returned to the screen shown in step 4. If you enter N, you will see the prompt:

    Completed: Enter <CR>:

    Press RETURN to display the main menu.