签到成功

知道了

CNDBA社区CNDBA社区

autoupgrade 工具配置参数说明

2025-06-30 12:42 13 0 原创 Oracle 19c
作者: dave

在之前的博客我们看了使用autoupgrade 工具升级数据库的示例,如下:http://www.cndba.cn/dave/article/131657

http://www.cndba.cn/dave/article/131657
http://www.cndba.cn/dave/article/131657

Oracle 11g 升级到19c 操作示例 — AutoUpgrade 工具(NON-CDB)
https://www.cndba.cn/dave/article/131640http://www.cndba.cn/dave/article/131657

http://www.cndba.cn/dave/article/131657

这里面配置文件内容比较多,可以使用如下命令生成配置模板:http://www.cndba.cn/dave/article/131657

http://www.cndba.cn/dave/article/131657

[dave@cndba.cn ]$ java -jar /u02/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/autoupgrade.jar -create_sample_file config

配置文件包含如下几个目录结构:

  1. 全局配置:Global configurations
  2. NON-CDB升级:Database number 1 - Full DB/CDB upgrade
  3. Unplug/Plug 升级:Database number 2 - Unplug/Plug upgrade
  4. Noncdb转PDB 升级:Database number 3 - Noncdb to PDB upgrade

完整的示例模版如下:http://www.cndba.cn/dave/article/131657http://www.cndba.cn/dave/article/131657

http://www.cndba.cn/dave/article/131657

[dave@cndba.cn software]$ cat sample_config.cfg 
#
# Sample config file for AutoUpgrade
#
# build version 25.3.250509
# build date    2025/05/09 02:53:51 +0000
#
#
# Global configurations
#
# This directory will include the following:
#   (1) AutoUpgrade''s global directory
#   (2) Any logs, not directly tied to a job
#   (3) Config files
#   (4) progress.json and status.json
global.autoupg_log_dir=/u02/app/oracle/cfgtoollogs/autoupgrade

#
# Database number 1 - Full DB/CDB upgrade
#
upg1.log_dir=/u02/app/oracle/cfgtoollogs/autoupgrade/employee             # Path of the log directory for the upgrade job
upg1.sid=emp                                              # ORACLE_SID of the source DB/CDB
upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1  # Path of the source ORACLE_HOME
upg1.target_home=/u01/app/oracle/product/23.1.0/dbhome_1  # Path of the target ORACLE_HOME
upg1.start_time=NOW                                       # Optional. [NOW | +XhYm (X hours, Y minutes after launch) | dd/mm/yyyy hh:mm:ss]
upg1.upgrade_node=ora11g                                # Optional. To find out the name of your node, run the hostname utility. Default is ''localhost''
#upg1.run_utlrp=[yes|no]                                  # Optional. Whether or not to run utlrp after upgrade
#upg1.timezone_upg=[yes|no]                               # Optional. Whether or not to run the timezone upgrade
#upg1.target_version=[12.2|18|19|21|23]                      # Oracle version of the target ORACLE_HOME.  Only required when the target Oracle database version is 12.2

#
# Database number 2 - Unplug/Plug upgrade
#
#upg2.log_dir=/u02/app/oracle/cfgtoollogs/autoupgrade/cdb12
#upg2.sid=cdb12
#upg2.source_home=/u01/app/oracle/product/12.2.0/dbhome_1
#upg2.target_cdb=cdb19
#upg2.target_home=/u01/app/oracle/product/23/dbhome_1
#upg2.pdbs=mypdb1,mypdb2                    # Comma delimited list of pdb names that will be upgraded and moved to the target CDB
#upg2.target_pdb_name.mypdb1=altpdb1        # Optional. Name of the PDB to be created on the target CDB
#upg2.target_pdb_copy_option.mypdb1=file_name_convert=('mypdb1', 'altpdb1')  # Optional. file_name_convert option used when creating the PDB on the target CDB
#upg2.target_pdb_name.mypdb2=altpdb2
#upg2.start_time=30/06/2025 13:21:16        # Optional. [NOW | +XhYm (X hours, Y minutes after launch) | dd/mm/yyyy hh:mm:ss]
#upg2.upgrade_node=localhost                # Optional. To find out the name of your node, run the hostname utility. Default is ''localhost''
#upg2.run_utlrp=[yes|no]                   # Optional. Whether or not to run utlrp after upgrade
#upg2.timezone_upg=[yes|no]                # Optional. Whether or not to run the timezone upgrade
#upg2.target_version=[12.2|18|19|21|23]       # Oracle version of the target ORACLE_HOME.  Only required when the target Oracle database version is 12.2

#
# Database number 3 - Noncdb to PDB upgrade
#
#upg3.log_dir=/u02/app/oracle/cfgtoollogs/autoupgrade/employee
#upg3.sid=emp
#upg3.source_home=/u01/app/oracle/product/11.2.0/dbhome_1
#upg3.target_cdb=cdb23
#upg3.target_home=/u01/app/oracle/product/19.8.0/dbhome_1
#upg3.target_pdb_name=pdb12
#upg3.target_pdb_copy_option=file_name_convert=('emp', 'emppdb')
#upg3.start_time=+10m                  # Optional. 10 Minutes from now
#upg3.upgrade_node=localhost           # Optional. To find out the name of your node, run the hostname utility. Default is ''localhost''
#upg3.run_utlrp=[yes|no]              # Optional. Whether or not to run utlrp after upgrade
#upg3.timezone_upg=[yes|no]           # Optional. Whether or not to run the timezone upgrade
#upg3.target_version=[12.2|18|19|21|23]  # Oracle version of the target ORACLE_HOME.  Only required when the target Oracle database version is 12.2

#
# You can have as many databases as desired
#
# ----- Unplug/Plug Upgrade -----
# To perform an Unplug/Plug operation that upgrades and moves one or more PDBs
# from a source CDB into a target CDB, use the target_cdb and pdbs parameters.
# The target_pdb_name and target_pdb_copy_option parameters can be used
# to determine how each PDB is created on the target CDB.
#
# ----- NonCDB to PDB conversion -----
# To upgrade and convert an existing NonCDB database into a PDB of a target CDB,
# use the target_cdb parameter to specify the destination CDB.
# The target_pdb_name and target_pdb_copy_option parameters can be used
# to determine how each PDB is created on the target CDB.
#
# When neither of these options are used, a full upgrade of the source DB/CDB is performed.
#

#upgN.log_dir=<Path of the log directory for the upgrade job>
#upgN.sid=<ORACLE_SID of the source DB/CDB>
#upgN.source_home=<Path of the source ORACLE_HOME>
#upgN.target_home=<Path of the target ORACLE_HOME>
#upgN.target_version=<Oracle version of the target ORACLE_HOME.  Only required when the target Oracle database version is 12.2>
#upgN.start_time=<Optional. [NOW | +XhYm (X hours, Y minutes after launch) | dd/mm/yyyy hh:mm:ss]>
#upgN.upgrade_node=<Optional. To find out the name of your node, run the hostname utility. Default is ''localhost''>
#upgN.run_utlrp=[yes|no]    # Optional. Whether or not to run utlrp after upgrade
#upgN.timezone_upg=[yes|no] # Optional. Whether or not to run the timezone upgrade

### Unplug/Plug parameters ###
#upgN.target_cdb=<ORACLE_SID of the target CDB>
#upgN.pdbs=<Comma delimited list of pdb names that will be upgraded and moved to the target CDB>
#upgN.<pdb_name>.target_pdb_name=<Optional. Name of the PDB to be created on the target CDB>
#upgN.<pdb_name>.target_pdb_copy_option=<Optional. file_name_convert option used when creating the PDB on the target CDB>

### NonCDB to PDB parameters ###
#upgN.target_cdb=<ORACLE_SID of the target CDB>
#upgN.target_pdb_name=<Optional. Name of the PDB to be created on the target CDB>
#upgN.target_pdb_copy_option=<Optional. file_name_convert option used when creating the PDB on the target CDB>

[dave@cndba.cn software]$

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2273
    原创
  • 3
    翻译
  • 579
    转载
  • 196
    评论
  • 访问:8147689次
  • 积分:4395
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ