Running the CHKUPG.EXE Utility

Before you begin an upgrade you should run the CHKUPG.EXE utility, which checks that database status is acceptable, that all necessary comments exist in the syscomments system table, and that there are no keyword conflicts. CHKUPG.EXE writes this information to an output file. Review this report and take any action the report indicates is necessary to prepare the existing installation for an upgrade.

    To check a SQL Server 4.2x installation prior to upgrading

For example:

chkupg /Usa /P /S /oc:\sql\install\myreport.out

After running CHKUPG.EXE, read its output file using any text editor.

If the CHKUPG.EXE output file indicates that the database is read only, run sp_dboption and set the read only option to FALSE. For information on sp_dboption, see the Microsoft SQL Server Transact-SQL Reference.

If the CHKUPG.EXE output file indicates that some text in the syscomments system table is missing or altered, drop and re-create the related objects, and then run CHKUPG.EXE again to verify that the necessary text exists in syscomments. (You cannot upgrade all objects from SQL Server 4.2x systems to SQL Server 6.0 if you have deleted data from the text column in the syscomments table. The setup program uses the comments in syscomments to upgrade database objects.)

CHKUPG.EXE reports both on keywords implemented in SQL Server 6.0 and on words that are reserved for future use but are not yet implemented. Reserved words are compatible with SQL Server 6.0 but can be expected to cause future conflicts. Reserved words are indicated in the output file by this notation:

[SQL-92 keyword]

For more information, see Keywords and Reserved Words, later in this chapter.

If the CHKUPG.EXE output file indicates conflicts with SQL Server 6.0 keywords, change the conflicting database or database object name and alter the applications that access those objects so that they use the new names. Keyword conflicts can be resolved either before or after the server is upgraded. Keyword conflicts will not cause an upgrade to fail.

CHKUPG.EXE only checks and reports on the current SQL Server 4.2x system. It does not correct incompatibilities, change read-only databases, add comments to syscomments, or take any other corrective action.

When you run the setup program and perform an upgrade from SQL Server 4.2x to SQL Server 6.0, one of the first things setup does is automatically run CHKUPG.EXE and inform you if a problem exists. Although setup runs CHKUPG.EXE automatically, it is still recommended that you first run CHKUPG.EXE separately.