Oracle Autoupgrade Available Commands
<<Back to DB Administration Main Page
java -jar autoupgrade.jar -help
Usage: java -jar autoupgrade.jar <option(s)>
Syntax: <required> [optional] default*
options = <run_type1|run_type2|run_type3>
run_type1 = -version | -help | -create_sample_file <options> | -listchecks <checkName>
run_type2 = [-settings <settings>]
<-config <config>|-config_values <config_values>>
[-mode <mode>]
[-load_password]
[-restore_on_fail]
[-console | -noconsole]
[-debug]
[-clear_recovery_data [-jobs job#,job#,...]]
[-restore -jobs <job#,job#,...>]>
[-zip [-sid <sid>] [-d <dir>] [-zip_exclusion_list <list>]]
run_type3 = -preupgrade <preupgrade>
[-mode <analyze|fixups|postfixups>]
[-debug]
-help*
Displays available options.
Example:
java -jar autoupgrade.jar -help
-version
Displays the AutoUpgrade version
Example:
java -jar autoupgrade.jar -version
-listchecks
List all checks or specified check
Example:
java -jar autoupgrade.jar -listchecks
java -jar autoupgrade.jar -listchecks ORACLE_RESERVED_USERS
-error_code [errorcode]
errorcode - Error to be filtered .
Displays the AutoUpgrade error codes
Example:
java -jar autoupgrade.jar -error_code
java -jar autoupgrade.jar -error_code UPG-3101
-create_sample_file <config [filename] [type] | settings [filename]>
type = [full*|unplug|noncdbtopdb]
config - Creates a sample configuration file.
settings - Creates a sample internal configuration file to
overwrite default configuration settings.
filename - The name of the config or settings file to create.
type - The type of config file to generate.
Creates a sample configuration file that can be used as reference.
Example:
java -jar autoupgrade.jar -create_sample_file settings settings.cfg
java -jar autoupgrade.jar -create_sample_file config config.cfg
java -jar autoupgrade.jar -create_sample_file config config.cfg unplug
-settings <settings_path>
settings_path - Path to internal settings file to overwrite the
default values.
Overwrites the default internal settings.
This is not needed for most cases.
Example:
java -jar autoupgrade.jar -settings settings.cfg -config config.cfg -mode analyze
-config <config_path>
config_path - User config file with the databases to upgrade or patch.
Specifies the user config file with the database(s) to upgrade or patch.
Example:
java -jar autoupgrade.jar -config config.cfg -mode analyze
-config_values <config_values>
config_values - User input comma-separated list where *
separates database entries.
Specifies the content of the configuration file without creating one,
it will read the ORACLE_HOME,ORACLE_SID,ORACLE_TARGET_HOME
and ORACLE_TARGET_VERSION from the environmental variables.
Example:
java -jar autoupgrade.jar -config_values "source_home=value,...*,source..." -mode analyze
-preupgrade <preupgrade>
preupgrade - User input comma-separated preupgrade options.
Makes the autoupgrade behave as the legacy preupgrade tool,
it will read the target ORACLE_HOME and ORACLE_VERSION
from the environmental variables.
Example:
java -jar autoupgrade.jar -preupgrade "target_version=21,dir=/tmp/log" -mode fixups
-clear_recovery_data [-jobs jobs_number]
jobs_number - comma-separated list of jobs to clear
Removes the recovery information which causes AutoUpgrade to start from
scratch on the specified or all databases. Use after manually restoring a
database and attempting a new upgrade or patch.
If no list of jobs is provided by default all the metadata is removed,
this will not remove log files or reset the jobid counter, only the
AutoUpgrade files used to keep track of the progress of each job.
Example:
java -jar autoupgrade.jar -config config.cfg -clear_recovery_data
java -jar autoupgrade.jar -config config.cfg -clear_recovery_data -jobs 111,222
-mode <mode>
mode = <analyze|fixups|deploy|upgrade|postfixups>
analyze - Executes the checks in the source home
database readiness status.
fixups - Executes the checks and pre-upgrade fixups but does not perform
the upgrade or patch.
deploy - Performs the upgrade or patching of the databases from start to end.
upgrade - Performs the database upgrade or patching and post actions.
The database must already be up and running in the target home.
postfixups - Executes the postfixups in the target home.
Mode on which the AutoUpgrade will start and behave.
Example:
java -jar autoupgrade.jar -config config.cfg -mode analyze
java -jar autoupgrade.jar -config config.cfg -mode deploy
java -jar autoupgrade.jar -preupgrade "target_version=21" -mode fixups
-load_password
Initiates an interactive console allowing passwords to be
loaded into AutoUpgrade's keystore
-console*
Start the AutoUpgrade with the console enabled.
-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 irrecoverable, only errors in
CDB$ROOT or Non-CDBs
-debug
Debug messages enabled
-restore -jobs <job#,job#,...>
job#,job#,... - comma-separated jobs list to restore
Executes a system-level restoration of the specified jobs.
The databases are flashed back to the Guarantee Restore Point (GRP).
The GRP must have been created by AutoUpgrade prior this command is run.
The console is disabled by default.
Example:
java -jar autoupgrade.jar -config config.cfg -restore -jobs 111
java -jar autoupgrade.jar -config config.cfg -restore -jobs 111,222 -console
java -jar autoupgrade.jar -config config.cfg -restore -jobs 111,222 -noconsole
-zip [-sid <sid>] [-d <dir>] [-zip_exclusion_list <list>]
-sid <sid> - Zip file will contain all the SIDs that are given in a
comma separated list.
-d <dir> - Directory path to save AutoUpgrade zip
-zip_exclusion_list <list> - A double comma separated regular string list to exclude all matched files in the zip file
Zips up log files required for filing an AutoUpgrade service request
If no "sid" is passed, it will create a zip file for all databases
in the config file.
If "zip_exclusion_list" is passed, it will exclude all files that match zip_exclusion_list
Example:
java -jar autoupgrade.jar -config config.cfg -zip
java -jar autoupgrade.jar -config config.cfg -zip -sid db18700
java -jar autoupgrade.jar -config config.cfg -zip -sid db18700,db19300
java -jar autoupgrade.jar -config config.cfg -zip -zip_exclusion_list "db18700/.*"
java -jar autoupgrade.jar -config config.cfg -zip -sid db18700 -d /tmp/
java -jar autoupgrade.jar -config config.cfg -load_win_credential <prefix>
- Opens a WinCredential cmdlet which prompts for user name and password and stores the values into an encrypted credential.
Comments
Post a Comment