Performs tests on an installation or database to determine its readiness for upgrade, and reports found problems. preupgrade is located in $SYBASE/$SYBASE_ASE/upgrade.
Windows The utility is preupgrd.exe, located in %SYBASE%\%SYBASE_ASE%\upgrade.
preupgrade [-v] [-h] [-N] [-D database_name] [-I interfaces_file] [-P password] [-S server_name] [-U user_name] [-X option[,option]...]
limits checking to the named database and a subset of possible checks. Use this parameter to check newly loaded databases before bringing them online.
prints help text and then exits.
specifies an interfaces file for the server. The default is $SYBASE/interfaces.
specifies preupgrade is to run in noninteractive mode. Thus, if preupgrade determines that any database is too small, the utility exits immediately.
specifies the password for connecting to the server. Sybase recommends that you do not use this option on the command line as the password is then visible to other users when they view displays of system information. Rather, wait until Adaptive Server prompts for a password, and enter the information then.
specifies the name of the server to which you want to connect. This server must be listed in the interfaces file specified by the -I parameter. The default is $DSQUERY.
specifies the user name to use when connecting to the server. The default is “sa.” user_name must have “sa_role” privileges on the server being checked.
If you use the -D option, which limits checking to a named database, and that database is offline, you must enter “sa” or accept the default as the user name.
prints version information and exits.
specifies a list of checks to be made. The default is all checks, except when using the -D option, which uses only a subset of available checks. If you specify the -X option more than once on the command line, preupgrade performs only those checks in the last entered -X parameter.
When using the -X parameter with an options list, you must either:
List options without a space between the comma and the next option, or
Surround the options list with quotes.
Valid check options are described in Table 8-2. Sybase may occasionally change valid options for the -X parameter; use the -h parameter to view the current set of valid options
This example runs preupgrade and specifies checks for the default cache size, minimum database size, and duplicate rows in sysstatistics for the installation.
preupgrade –X cache,db_size,statistics
This example runs preupgrade to check a newly loaded, offline database. preupgrade checks datatypes, free space, object IDs, and stored procedure text.
preupgrade –Dmy_db –Usa
This example shows how the sqlupgrade utility uses preupgrade. When used in this way, preupgrade checks all databases, runs noninteractively, and exits with a failing status if any database is too small.
preupgrade –N
When preupgrade finds no errors, it exits with status 0 (zero).
preupgrade is primarily used before upgrading an installation to ensure the procedure will run smoothly. You can also run preupgrade after loading a database created by a previous version of Adaptive Server to check for problems that might prevent that database from upgrading while being brought online.
sqlupgrade calls preupgrade as part of its normal procedure.
Unless the -D parameter is included, preupgrade checks all databases in the system, and runs only on previous server versions.
If the -D parameter is included, preupgrade:
Checks only the named database.
Can run be run against server of the same version number as the preupgrade utility.
Limits checking to a subset of possible checks. See Table 8-2 for a list of checks that are valid when used in conjunction with this parameter.
The -D parameter is used 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.”
When running preupgrade after upgrade to check a newly loaded but offline database, you must 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.
sqlupgrade always runs the full set of preupgrade checks. You can correct problems and run preupgrade to ensure that the problems are indeed corrected before letting sqlupgrade repeat the full preupgrade procedure.
The user login specified by the -U parameter must have System Administrator privileges to run preupgrade on the server specified by the -S parameter.
When using the -D parameter to check an offline database, preupgrade must log in as user “sa.” The “sa_role” privilege is insufficient
Utilities sqlupgrade, sqlupgraderes
Copyright © 2005. Sybase Inc. All rights reserved. |