The preupgrade -D Parameter

Use the -D parameter primarily to check newly loaded databases before bringing them online.

To do so, preupgrade must force access to offline databases, which requires that preupgrade log in as user “sa” The “sa_role” privilege alone is insufficient. The default is -Usa.

When run as part of a normal upgrade, the -D parameter is optional, and you can choose a system administrator login other than “sa.”

Unless the -D parameter is included, preupgrade checks all databases in the system, and runs only on previous server versions.

sqlupgrade always runs the full set of preupgrade checks. Correct problems and run preupgrade to ensure that the problems are indeed corrected before letting sqlupgrade repeat the full preupgrade procedure.

If the -D parameter is included, preupgrade:

When running preupgrade after an upgrade to check a newly loaded but offline database, use the -D parameter and either specify the “sa” login or omit the -U parameter.

When you specify the -D option, or specify a partial list of options with the -X parameter, preupgrade performs the specified checks and, if there are no errors, displays a list of checks performed in the exit message.

You may want to use the -D and the -X parameters as part of the normal upgrade if preupgrade reports warnings or errors for a particular database or area. Using these parameters allows you to focus on problem areas without repeating unnecessary checks.