以下看操作步骤:
1.查看autoupgrade.jar 的帮助
java -jar autoupgrade.jar -h
usage: java -jar autoupgrade.jar [-version | -help | -create_sample_file <create_sample_file>] [-settings <settings>] [-config <config>]
[-clear_recovery_data] [-mode <mode>] [-console | -noconsole] [-restore_on_fail] [-debug] [-zip] [-sid <sid>] [-d <d>]
-version Displays the current build of the jar
-help Displays the available options
-create_sample_file <create_sample_file> Creates a sample configuration file that be used as reference
config - Creates a sample configuration file
settings - Creates a sample internal configuration file to allow a deeper low level configuration
-settings <settings> Path to config file to overwrite internal settings
-config <config> User config file with the databases to upgrade
-clear_recovery_data Remove the recovery checkpoint to start fresh the next time the tool is launched
-mode <mode> Mode on which the AutoUpgrade will start and behave
analyze - Executes the checks and generates a report of the database status
deploy - Performs the upgrade of the databases from start to end
fixups - Executes the checks and pre-upgrade fixups but do not start the upgrade
upgrade - Performs the database upgrade and post-upgrade actions. The database must already be up and running
with the target home
-console Start the AutoUpgrade with the console enabled (default)
-noconsole Start the AutoUpgrade with the console disabled
-restore_on_fail If present, when a job fails, the database is restored automatically. Errors in PDBs are not considered fatal,
only errors in CDB$ROOT or Non-CDBs
-debug Debug messages enabled
-zip Zips up log files required for filing an AutoUpgrade service request.
-sid <sid> Zip file will contain all the SIDs that are given in a comma separated list.
-d <d> Path to save AutoUpgrade zip file
The config option with sample parameter creates a sample database configuration file with default values.
Or you can use it with a custom database configuration file with an execution mode (deploy, analyze, fixups or upgrade).
The settings parameter lets you use a file with Autoupgrade internal settings, can be default for base settings or you can specify a file path for custom
settings.
Unrecognized option: [-h]
您将会看到如下输出:
Autoupgrade tool launched with default options
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be analyzed
Type 'help' to list console commands
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished successfully [1]
Jobs failed [0]
Jobs pending [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 100 FOR DB19
您将会看到如下输出:
Autoupgrade tool launched with default options
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be processed
Type 'help' to list console commands
upg>