oracle11gRAC升级到oracleRAC19C

本文档详细记录了从Oracle 11g集群升级到19c的过程,包括环境检查、补丁应用、ASM磁盘组兼容性设置、NTP服务配置、软件安装目录权限调整、升级脚本执行以及解决升级过程中遇到的问题,如服务启动失败、资源冲突等。最终成功完成了GI和数据库软件的升级。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

升级oracle11g集群到19.3

前述环境检查:

[root@qhdb1 ~]# crsctl status res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS       

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA1.dg

               ONLINE  ONLINE       qhdb1                                        

               ONLINE  ONLINE       qhdb2                                        

ora.LISTENER.lsnr

               ONLINE  ONLINE       qhdb1                                        

               ONLINE  ONLINE       qhdb2                                        

ora.OCR.dg

               ONLINE  ONLINE       qhdb1                                        

               ONLINE  ONLINE       qhdb2                                        

ora.asm

               ONLINE  ONLINE       qhdb1                    Started             

               ONLINE  ONLINE       qhdb2                    Started             

ora.gsd

               OFFLINE OFFLINE      qhdb1                                        

               OFFLINE OFFLINE      qhdb2                                        

ora.net1.network

               ONLINE  ONLINE       qhdb1                                        

               ONLINE  ONLINE       qhdb2                                        

ora.ons

               ONLINE  ONLINE       qhdb1                                        

               ONLINE  ONLINE       qhdb2                                        

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       qhdb1                                        

ora.andb.db

      1        ONLINE  ONLINE       qhdb1                    Open                

      2        ONLINE  ONLINE       qhdb2                    Open                

ora.cvu

      1        ONLINE  ONLINE       qhdb1                                        

ora.oc4j

      1        ONLINE  OFFLINE                                                   

ora.qhdb1.vip

      1        ONLINE  ONLINE       qhdb1                                        

ora.qhdb2.vip

      1        ONLINE  ONLINE       qhdb2                                        

ora.scan1.vip

      1        ONLINE  ONLINE       qhdb1                

-------------------------------------------------------------------------------

CRS版本检查:

[root@qhdb1 ~]# crsctl  query crs  releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.4.0]

[root@qhdb1 ~]# crsctl query crs softwareversion

Oracle Clusterware version on node [qhdb1] is [11.2.0.4.0]

You have mail in /var/spool/mail/root

[root@qhdb1 ~]# crsctl query crs softwareversion -all

Oracle Clusterware version on node [qhdb2] is [11.2.0.4.0]

Oracle Clusterware version on node [qhdb1] is [11.2.0.4.0]

[root@qhdb1 ~]# crsctl   check  cluster  -all

**************************************************************

qhdb1:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

qhdb2:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

ASM兼容性检查:

SQL> set lines 300

SQL> col name for a30

col COMPATIBILITY for a30

col DATABASE_COMPATIBILITY for a40

select GROUP_NUMBER,NAME,TYPE,COMPATIBILITY,DATABASE_COMPATIBILITY   from v$asm_diskgroup;

SQL> SQL> SQL>

GROUP_NUMBER NAME                           TYPE   COMPATIBILITY                  DATABASE_COMPATIBILITY

------------ ------------------------------ ------ ------------------------------ ----------------------------------------

           1 OCR                            NORMAL 11.2.0.0.0                     10.1.0.0.0

           2 DATA1                          EXTERN 11.2.0.0.0                     10.1.0.0.0

设置ASM兼容性:

alter diskgroup DATA1   set attribute   'compatible.rdbms'='x';

alter diskgroup DATA1   set attribute   'compatible.asm'='x';

补丁应用情况检查:

SQL> set lines 300

SQL> col COMP_NAME for a50

SQL> select COMP_ID,comp_name,version,status from dba_registry order by  4;

COMP_ID                        COMP_NAME                                          VERSION                        STATUS

------------------------------ -------------------------------------------------- ------------------------------ --------------------------------------------

OWB                            OWB                                                11.2.0.4.0                     VALID

RAC                            Oracle Real Application Clusters                   11.2.0.4.0                     VALID

EM                             Oracle Enterprise Manager                          11.2.0.4.0                     VALID

AMD                            OLAP Catalog                                       11.2.0.4.0                     VALID

SDO                            Spatial                                            11.2.0.4.0                     VALID

ORDIM                          Oracle Multimedia                                  11.2.0.4.0                     VALID

XDB                            Oracle XML Database                                11.2.0.4.0                     VALID

CONTEXT                        Oracle Text                                        11.2.0.4.0                     VALID

EXF                            Oracle Expression Filter                           11.2.0.4.0                     VALID

RUL                            Oracle Rules Manager                               11.2.0.4.0                     VALID

OWM                            Oracle Workspace Manager                           11.2.0.4.0                     VALID

COMP_ID                        COMP_NAME                                          VERSION                        STATUS

------------------------------ -------------------------------------------------- ------------------------------ --------------------------------------------

CATALOG                        Oracle Database Catalog Views                      11.2.0.4.0                     VALID

CATPROC                        Oracle Database Packages and Types                 11.2.0.4.0                     VALID

JAVAVM                         JServer JAVA Virtual Machine                       11.2.0.4.0                     VALID

XML                            Oracle XDK                                         11.2.0.4.0                     VALID

CATJAVA                        Oracle Database Java Packages                      11.2.0.4.0                     VALID

APS                            OLAP Analytic Workspace                            11.2.0.4.0                     VALID

XOQ                            Oracle OLAP API                                    11.2.0.4.0                     VALID

APEX                           Oracle Application Express                         3.2.1.00.12                    VALID

19 rows selected.

SQL>

SQL> col ACTION_TIME for a30

SQL> col ACTION for a15

SQL> col NAMESPACE for a15

SQL> col VERSION for a25

SQL> col COMMENTS for a60

SQL> col BUNDLE_SERIES for a15

set lines 400

select * from dba_registry_history order by 1;

SQL> SQL>

ACTION_TIME                    ACTION          NAMESPACE       VERSION                           ID BUNDLE_SERIES   COMMENTS

------------------------------ --------------- --------------- ------------------------- ---------- --------------- ------------------------------------------------------------

24-AUG-13 12.03.45.119862 PM   APPLY           SERVER          11.2.0.4                           0 PSU             Patchset 11.2.0.2.0

10-AUG-21 01.45.44.791636 PM   APPLY           SERVER          11.2.0.4                           0 PSU             Patchset 11.2.0.2.0

10-AUG-21 03.18.19.828867 PM   APPLY           SERVER          11.2.0.4                      190416 PSU             PSU 11.2.0.4.190416

[grid@qhdb1 ~]$ opatch lsinv

Oracle Interim Patch Installer version 11.2.0.3.21

Copyright (c) 2021, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/11.2.4/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/11.2.4/grid/oraInst.loc

OPatch version    : 11.2.0.3.21

OUI version       : 11.2.0.4.0

Log file location : /u01/app/11.2.4/grid/cfgtoollogs/opatch/opatch2021-08-11_10-30-33AM_1.log

Lsinventory Output file location : /u01/app/11.2.4/grid/cfgtoollogs/opatch/lsinv/lsinventory2021-08-11_10-30-33AM.txt

--------------------------------------------------------------------------------

Local Machine Information::

Hostname: qhdb1.zpepc.com.cn

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 11g                                       11.2.0.4.0

There are 1 products installed in this Oracle Home.

Interim patches (3) :

Patch  28729245     : applied on Tue Aug 10 14:34:05 CST 2021

Unique Patch ID:  22724549

Patch description:  "ACFS Patch Set Update : 11.2.0.4.190115 (28729245)"

   Created on 2 Nov 2018, 04:47:07 hrs PST8PDT

   Bugs fixed:

     28069955, 26247490, 21369858, 16318126, 19690653, 17503605, 17203009

     17359415, 20140148, 17611362, 25098392, 17270418, 17164243, 19053182

     17696547, 17488768, 25078431, 18168684, 21519796, 18143006, 21208140

     23321114, 17428148, 17070158, 20438706, 17510275, 17172303, 28142134

     18610307, 17376318, 17721778, 22198405, 17699423, 22810422, 18915417

     21233961, 18155334, 25381434, 19919907, 18321597, 18185024, 17363999

     17636008, 27593263, 20681968, 17475946, 27463879

Patch  29141056     : applied on Tue Aug 10 14:33:07 CST 2021

Unique Patch ID:  22768427

Patch description:  "Database Patch Set Update : 11.2.0.4.190416 (29141056)"

   Created on 17 Feb 2019, 23:52:26 hrs PST8PDT

Sub-patch  28729262; "Database Patch Set Update : 11.2.0.4.190115 (28729262)"

1.配置19 软件安装目录

grid:节点qhdb1

umask 022

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.4/grid

####19c ORACLE_HOME

##export ORACLE_HOME=/u01/app/19.0.0/grid

export ORACLE_SID=+ASM2

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/bin:/usr/sbin:/usr/local/bin:$PATH

grid:节点qhdb2

umask 022

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.4/grid

####19c ORACLE_HOME

##export ORACLE_HOME=/u01/app/19.0.0/grid

export ORACLE_SID=+ASM1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/bin:/usr/sbin:/usr/local/bin:$PATH

oracle:节点qhdb1

umask 022

export ORACLE_BASE=/u01/app/oracle

export ORACLE_SID=andb2

export ORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1

#####19c oracle_home

##export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_home1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib

export PATH=$ORACLE_HOME/bin:/u01/app/11.2.4/grid/bin:/usr/bin:/usr/sbin:/usr/local/bin:$PATH

oracle:节点qhdb2

umask 022

export ORACLE_BASE=/u01/app/oracle

export ORACLE_SID=andb1

export ORACLE_HOME=/u01/app/oracle/product/11.2.4/db_home1

#####19c oracle_home

##export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_home1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib

export PATH=$ORACLE_HOME/bin:/u01/app/11.2.4/grid/bin:/usr/bin:/usr/sbin:/usr/local/bin:$PATH

2.拷贝软件到ORACLE_HOME

grid:

cp LINUX.X64_193000_grid_home.zip /u01/app/19.0.0/grid/

oracle:

cp LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.0.0/db_home1/

修改软件包权限,并解压:

grid:

[grid@qhdb1 grid]$ logout

You have mail in /var/spool/mail/root

[root@qhdb1 app]# cd /u01/app/19.0.0/grid

[root@qhdb1 grid]# ls -lrt

total 2821472

-rw-r--r-- 1 root root 2889184573 Aug 11 10:16 LINUX.X64_193000_grid_home.zip

[root@qhdb1 grid]#

[root@qhdb1 grid]# chown -R grid:oinstall LINUX.X64_193000_grid_home.zip

[root@qhdb1 grid]# su - grid

Last login: Wed Aug 11 10:30:28 CST 2021 on pts/0

[grid@qhdb1 ~]$ cd /u01/app/19.0.0/grid

[grid@qhdb1 grid]$ ls -lrt

total 2821472

-rw-r--r-- 1 grid oinstall 2889184573 Aug 11 10:16 LINUX.X64_193000_grid_home.zip

[grid@qhdb1 grid]$ unzip LINUX.X64_193000_grid_home.zip

oracle:

[oracle@qhdb1 ~]$ cd /u01/app/oracle/product/19.0.0/db_home1

[oracle@qhdb1 db_home1]$ ls -lrt

total 2987996

-rw-r--r-- 1 root root 3059705302 Aug 11 10:22 LINUX.X64_193000_db_home.zip

[oracle@qhdb1 db_home1]$

[oracle@qhdb1 db_home1]$

[oracle@qhdb1 db_home1]$ logout

[root@qhdb1 ~]# cd /u01/app/oracle/product/19.0.0/db_home1

[root@qhdb1 db_home1]# chown -R oracle:oinstall LINUX.X64_193000_db_home.zip

[root@qhdb1 db_home1]# su - oracle

Last login: Wed Aug 11 10:32:29 CST 2021 on pts/3

[oracle@qhdb1 ~]$ cd /u01/app/oracle/product/19.0.0/db_home1

[oracle@qhdb1 db_home1]$ ls -lrt

total 2987996

-rw-r--r-- 1 oracle oinstall 3059705302 Aug 11 10:22 LINUX.X64_193000_db_home.zip

[oracle@qhdb1 db_home1]$

[oracle@qhdb1 db_home1]$

[oracle@qhdb1 db_home1]$ unzip LINUX.X64_193000_db_home.zip

3.调出VNC,准备升级CRS

[grid@qhdb1 grid]$ export DISPLAY=:1

[grid@qhdb1 grid]$ pwd

/u01/app/19.0.0/grid

[grid@qhdb1 grid]$ ./gridSetup.sh

1.选择升级GI-

 

2.直接点击下一步--若互信有问题则会提示、重新配置互信

 

3.点击下一步

 

4.设置ORACLE_BASE 和ORACLE_HOME目录,这里ORACLE_HOME目录是灰色不让选择的,但是BASE目录是可以选择的

 

5.升级脚本是自动运行还是手工运行

手工运行uproot.sh脚本就不要选择

要是自动运行升级脚本,则打勾勾,输入root密码

 

6.需要注意:

 

 

尝试忽略,提示不能够忽略,所以,接下来 我们需要逐个问题结局:

1.提示需要安装补丁:28553832

     2.设置ASM diskgroup compatibility 兼容性参数设置;

     3.time oggset between nodes :两个节点时间差太大,需要设置NTP服务;

一:首先解决:NTP

配置NTP服务器:

 

二:查看ASM磁盘组兼容性参数,并修改:

 

 

三:补丁更新:28553832--

注意:我这里直接下载了11.2.0.4的最新补丁包:31718723

 

接下来就可以忽略升级GI

 

接下来就是升级GI

 

 

执行升级脚本:

 

 

节点一执行升级脚本:

[root@qhdb1 ~]# /u01/app/19.0.0/grid/rootupgrade.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Relinking oracle with rac_on option

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/qhdb1/crsconfig/rootcrs_qhdb1_2021-08-16_08-15-33AM.log

2021/08/16 08:15:49 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.

2021/08/16 08:15:49 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 08:15:49 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.

2021/08/16 08:15:53 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.

2021/08/16 08:15:54 CLSRSC-464: Starting retrieval of the cluster configuration data

2021/08/16 08:16:01 CLSRSC-692: Checking whether CRS entities are ready for upgrade. This operation may take a few minutes.

2021/08/16 08:18:50 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 08:18:50 CLSRSC-693: CRS entities validation completed successfully.

2021/08/16 08:18:54 CLSRSC-515: Starting OCR manual backup.

2021/08/16 08:18:59 CLSRSC-516: OCR manual backup successful.

2021/08/16 08:21:21 CLSRSC-486:

 At this stage of upgrade, the OCR has changed.

 Any attempt to downgrade the cluster after this point will require a complete cluster outage to restore the OCR.

2021/08/16 08:21:21 CLSRSC-541:

 To downgrade the cluster:

 1. All nodes that have been upgraded must be downgraded.

2021/08/16 08:21:21 CLSRSC-542:

 2. Before downgrading the last node, the Grid Infrastructure stack on all other cluster nodes must be down.

2021/08/16 08:21:27 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2021/08/16 08:21:27 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.

2021/08/16 08:21:28 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.

2021/08/16 08:21:32 CLSRSC-363: User ignored prerequisites during installation

2021/08/16 08:21:38 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.

2021/08/16 08:21:38 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.

2021/08/16 08:22:03 CLSRSC-468: Setting Oracle Clusterware and ASM to rolling migration mode

2021/08/16 08:22:03 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/asmca -silent -upgradeNodeASM -nonRolling false -oldCRSHome /u01/app/11.2.4/grid -oldCRSVersion 11.2.0.4.0 -firstNode true -startRolling true '

ASM configuration upgraded in local node successfully.

2021/08/16 08:22:10 CLSRSC-469: Successfully set Oracle Clusterware and ASM to rolling migration mode

2021/08/16 08:25:52 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack

2021/08/16 08:26:19 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

2021/08/16 08:26:24 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.

2021/08/16 08:26:24 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.

2021/08/16 08:26:35 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.

2021/08/16 08:26:36 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.

2021/08/16 08:26:42 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.

2021/08/16 08:26:49 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.

2021/08/16 08:26:49 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'

2021/08/16 08:27:51 CLSRSC-595: Executing upgrade step 14 of 18: 'InstallACFS'.

CRS-41053: checking Oracle Grid Infrastructure for file permission issues

PRVH-0116 : Path "/u01/app/19.0.0/grid/crs/install/cmdllroot.sh" with permissions "rw-r--r--" does not have execute permissions for the owner, file's group, and others on node "qhdb1".

PRVG-2031 : Owner of file "/u01/app/19.0.0/grid/crs/install/cmdllroot.sh" did not match the expected value on node "qhdb1". [Expected = "grid(1002)" ; Found = "root(0)"]

PRVG-2032 : Group of file "/u01/app/19.0.0/grid/crs/install/cmdllroot.sh" did not match the expected value on node "qhdb1". [Expected = "oinstall(1006)" ; Found = "root(0)"]

CRS-4124: Oracle High Availability Services startup failed.

CRS-4000: Command Start failed, or completed with errors.

2021/08/16 08:30:00 CLSRSC-117: Failed to start Oracle Clusterware stack

Died at /u01/app/19.0.0/grid/crs/install/crsutils.pm line 11714.

You have mail in /var/spool/mail/root

[root@qhdb1 ~]#  

 

升级报错: 权限不足

检查:"/u01/app/19.0.0/grid/crs/install/cmdllroot.sh权限

修改权限:chown  -R grid:oinstall * ; chmod -R  775 *  

看到这个目录有些文件权限是root:root ,所以 我们直接修改。----------------------------问题OK!

重新执行升级脚本:

[root@qhdb1 ~]# /u01/app/19.0.0/grid/rootupgrade.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Relinking oracle with rac_on option

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/qhdb1/crsconfig/rootcrs_qhdb1_2021-08-16_09-15-01AM.log

2021/08/16 09:15:12 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.

2021/08/16 09:15:12 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:15:12 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:16:52 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:16:52 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.

2021/08/16 09:16:53 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.

2021/08/16 09:16:53 CLSRSC-464: Starting retrieval of the cluster configuration data

2021/08/16 09:16:57 CLSRSC-692: Checking whether CRS entities are ready for upgrade. This operation may take a few minutes.

2021/08/16 09:17:00 CLSRSC-693: CRS entities validation completed successfully.

2021/08/16 09:17:04 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:17:06 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2021/08/16 09:17:06 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.

2021/08/16 09:17:07 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.

2021/08/16 09:17:07 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.

2021/08/16 09:17:07 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.

2021/08/16 09:17:07 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.

2021/08/16 09:17:08 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.

2021/08/16 09:17:09 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.

2021/08/16 09:17:44 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.

2021/08/16 09:17:45 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.

2021/08/16 09:17:46 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.

CSKM-1110: error while generating cluster root certificate

CRS-10403: (:CLSCRED0102:)Could not connect to credential storage: PROCL-32: Oracle High Availability Services on the local node is not running Messaging error [gipcretConnectionRefused] [29].

CRS-4000: Command Delete failed, or completed with errors.

问题:执行升级脚本失败,分析问题原因:提示HAS not running!!!

由于我们Linux版本是7,原数据库版本是11g,由于11g和Linux7版本的systemd进程服务不相匹配,

所以我们在Linux7版本上安装oracle11gRAC,需要手工创建ohas.service

以下是Linux上安装11g,需要配置的OHAS服务。

启动服务:

systemctl daemon-reload

systemctl enable ohas.service

systemctl start ohas.service

systemctl status ohas.service

/usr/lib/systemd/system/ohas.service

处理方式:ps -fle | grep d.bin  然后kill

关闭ohas服务:

systemctl disable  ohas.service

systemctl stop   ohas.service

然后在重新执行升级脚本:

[root@qhdb1 ~]# /u01/app/19.0.0/grid/rootupgrade.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Relinking oracle with rac_on option

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/qhdb1/crsconfig/rootcrs_qhdb1_2021-08-16_09-40-46AM.log

2021/08/16 09:40:57 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.

2021/08/16 09:40:57 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:40:57 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:42:37 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:42:37 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.

2021/08/16 09:42:38 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.

2021/08/16 09:42:38 CLSRSC-464: Starting retrieval of the cluster configuration data

2021/08/16 09:42:43 CLSRSC-692: Checking whether CRS entities are ready for upgrade. This operation may take a few minutes.

2021/08/16 09:42:50 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 09:45:40 CLSRSC-693: CRS entities validation completed successfully.

2021/08/16 09:45:46 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2021/08/16 09:45:46 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.

2021/08/16 09:45:47 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.

2021/08/16 09:45:47 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.

2021/08/16 09:45:47 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.

2021/08/16 09:45:47 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.

2021/08/16 09:45:48 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.

2021/08/16 09:45:49 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.

2021/08/16 09:45:49 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.

2021/08/16 09:45:50 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.

2021/08/16 09:45:51 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.

2021/08/16 09:45:54 CLSRSC-595: Executing upgrade step 14 of 18: 'InstallACFS'.

2021/08/16 09:48:17 CLSRSC-595: Executing upgrade step 15 of 18: 'InstallKA'.

2021/08/16 09:48:24 CLSRSC-595: Executing upgrade step 16 of 18: 'UpgradeCluster'.

clscfg: EXISTING configuration version 5 detected.

Successfully taken the backup of node specific configuration in OCR.

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

2021/08/16 10:01:59 CLSRSC-343: Successfully started Oracle Clusterware stack

2021/08/16 10:02:05 CLSRSC-595: Executing upgrade step 17 of 18: 'UpgradeNode'.

2021/08/16 10:02:09 CLSRSC-474: Initiating upgrade of resource types

2021/08/16 10:02:58 CLSRSC-475: Upgrade of resource types successfully initiated.

2021/08/16 10:03:07 CLSRSC-595: Executing upgrade step 18 of 18: 'PostUpgrade'.

2021/08/16 10:03:21 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

 

看到软件已经升级成功了!

开始升级节点2:/u01/app/19.0.0/grid/rootupgrade.sh

CRS-1115: Oracle Clusterware has already been upgraded.

2021/08/16 10:36:54 CLSRSC-479: Successfully set Oracle Clusterware active version

2021/08/16 10:37:02 CLSRSC-476: Finishing upgrade of resource types

PRCR-1079 : Failed to start resource ora.qosmserver

TCC-0004: The container was not able to start.

Failed to start connector [Connector[HTTP/1.1-8888]]Failed to initialize component [Connector[HTTP/1.1-8888]]

Protocol handler initialization failed

Address already in use

CRS-2674: Start of 'ora.qosmserver' on 'qhdb2' failed

TCC-0004: The container was not able to start.

Failed to start connector [Connector[HTTP/1.1-8888]]Failed to initialize component [Connector[HTTP/1.1-8888]]

Protocol handler initialization failed

Address already in use

CRS-2674: Start of 'ora.qosmserver' on 'qhdb1' failed

CRS-2632: There are no more servers to try to place resource 'ora.qosmserver' on that would satisfy its placement policy

2021/08/16 10:37:37 CLSRSC-180: An error occurred while executing the command '/u01/app/19.0.0/grid/bin/srvctl upgrade model  -s 11.2.0.4.0 -d 19.0.0.0.0 -p last'

2021/08/16 10:37:37 CLSRSC-284: Failed to perform last node tasks for cluster modeling upgrade

Died at /u01/app/19.0.0/grid/crs/install/orasrvm.pm line 570.

解决方式:

[root@qhdb2 ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6     注释掉

 

1.查看lo的IPV6地址:

删除 :

ip addr del ::1/128 dev lo

netstat -tunlp | grep ':8888'

ps -fle | grep d.bin     ---KILL

ps -fle | grep grid      ---KILL

然后重新运行rootupgrade.sh 升级脚本

=============================================

[root@qhdb2 app]# /u01/app/19.0.0/grid/rootupgrade.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Relinking oracle with rac_on option

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/qhdb2/crsconfig/rootcrs_qhdb2_2021-08-16_02-21-22PM.log

2021/08/16 14:21:31 CLSRSC-595: Executing upgrade step 1 of 18: 'UpgradeTFA'.

2021/08/16 14:21:31 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 14:21:31 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 14:23:11 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 14:23:11 CLSRSC-595: Executing upgrade step 2 of 18: 'ValidateEnv'.

2021/08/16 14:23:12 CLSRSC-595: Executing upgrade step 3 of 18: 'GetOldConfig'.

2021/08/16 14:23:12 CLSRSC-464: Starting retrieval of the cluster configuration data

2021/08/16 14:23:24 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2021/08/16 14:23:48 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2021/08/16 14:23:49 CLSRSC-595: Executing upgrade step 4 of 18: 'GenSiteGUIDs'.

2021/08/16 14:23:49 CLSRSC-595: Executing upgrade step 5 of 18: 'UpgPrechecks'.

2021/08/16 14:23:49 CLSRSC-595: Executing upgrade step 6 of 18: 'SetupOSD'.

2021/08/16 14:23:49 CLSRSC-595: Executing upgrade step 7 of 18: 'PreUpgrade'.

2021/08/16 14:23:49 CLSRSC-595: Executing upgrade step 8 of 18: 'CheckCRSConfig'.

2021/08/16 14:23:50 CLSRSC-595: Executing upgrade step 9 of 18: 'UpgradeOLR'.

2021/08/16 14:23:51 CLSRSC-595: Executing upgrade step 10 of 18: 'ConfigCHMOS'.

2021/08/16 14:24:22 CLSRSC-595: Executing upgrade step 11 of 18: 'UpgradeAFD'.

2021/08/16 14:24:23 CLSRSC-595: Executing upgrade step 12 of 18: 'createOHASD'.

2021/08/16 14:24:24 CLSRSC-595: Executing upgrade step 13 of 18: 'ConfigOHASD'.

2021/08/16 14:24:24 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'

2021/08/16 14:24:38 CLSRSC-595: Executing upgrade step 14 of 18: 'InstallACFS'.

2021/08/16 14:24:40 CLSRSC-595: Executing upgrade step 15 of 18: 'InstallKA'.

2021/08/16 14:24:41 CLSRSC-595: Executing upgrade step 16 of 18: 'UpgradeCluster'.

2021/08/16 14:25:47 CLSRSC-343: Successfully started Oracle Clusterware stack

2021/08/16 14:25:53 CLSRSC-595: Executing upgrade step 17 of 18: 'UpgradeNode'.

CRS-1115: Oracle Clusterware has already been upgraded.

2021/08/16 14:25:58 CLSRSC-478: Setting Oracle Clusterware active version on the last node to be upgraded

2021/08/16 14:25:58 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/crsctl set crs activeversion'

CRS-1115: Oracle Clusterware has already been upgraded.

2021/08/16 14:26:58 CLSRSC-479: Successfully set Oracle Clusterware active version

2021/08/16 14:27:06 CLSRSC-476: Finishing upgrade of resource types

2021/08/16 14:27:45 CLSRSC-477: Successfully completed upgrade of resource types

2021/08/16 14:28:43 CLSRSC-595: Executing upgrade step 18 of 18: 'PostUpgrade'.

Successfully updated XAG resources.

2021/08/16 14:29:13 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

至此GI升级完成!!!DB的升级其实就是重新安装一套数据库软件而已,这个一般来时不会出现问题的。

-----------------------接下来升级数据库软件

节点一 二创建19c数据软件目录

mkdir -pv /u01/app/oracle/product/19.0.0/db_home1

chown -R oracle:oinstall /u01/app/oracle/product/19.0.0

chmod -R 775 /u01/app/oracle/product/19.0.0/db_home1

 

 

su - oracle

unzip LINUX.X64_193000_db_home.zip

调出图形化,装备安装19c数据库软件

 

仅安装数据库软件

 

集群数据库软件

 

 

默认选择NEXT

 

默认选择NEXT

 

默认选择NEXT

 

 

默认选择NEXT

默认选择NEXT--点击忽略打勾勾

 

 

 

 

执行完毕后点击OK  软件升级完成!!!

------------------------------接下来升级数据库andb

 

---拷贝文件11g $ORACLE_HOME/dbs/initandb***.ora  到19c环境下

 

 

ORA-00603: ORACLE server session terminated by fatal error

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE

提示cluster_database 参数需要修改

[oracle@qhdb1 ~]$ sqlplus  / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Aug 16 16:42:49 2021

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

SQL>

SQL> startup nomount

ORACLE instance started.

Total System Global Area 8589930600 bytes

Fixed Size                 12456040 bytes

Variable Size            1593835520 bytes

Database Buffers         6962544640 bytes

Redo Buffers               21094400 bytes

SQL>

SQL> show parameter cluster

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

cdb_cluster                          boolean     FALSE

cdb_cluster_name                     string

cluster_database                     boolean     TRUE

cluster_database_instances           integer     2

cluster_interconnects                string

SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> shu abort

ORACLE instance shut down.

SQL> startup  upgrade

ORACLE instance started.

Total System Global Area 8589930600 bytes

Fixed Size                 12456040 bytes

Variable Size            1593835520 bytes

Database Buffers         6962544640 bytes

Redo Buffers               21094400 bytes

Database mounted.

Database opened.

 

接下来就是升级数据字典了!!!----- @?/rdbms/admin/catupgrd.sql

OK 提示我们按照它提供的方式进行升级!!

cd $ORACLE_HOME/rdbms/admin

$ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql

 

----------------------

cd $ORACLE_HOME/rdbms/admin

$ORACLE_HOME/perl/bin/perl catctl.pl -n 24 catupgrd.sql

-n  24 开并发进行升级!!

[oracle@qhdb1 admin]$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 24 catupgrd.sql

升级后补充运行脚本,要是手动升级数据库,但是未运行脚本catuppst.sql脚本,则数据库的性能随着时间下降。

$ORACLE_HOME/perl/bin/perl   $ORACLE_HOME/rdbms/admin/catcon.pl  -n 24 -e -b  catuppst -d "."  catuppst.sql

编译无效对象:

$ORACLE_HOME/perl/bin/perl   $ORACLE_HOME/rdbms/admin/catcon.pl  -n 24 -e -b utlrp -d "."  utlrp.sql

----------------------升级完后检查:

1.timezone_file

2.sqlnet.ora

3.ora-20000权限不足检查

4.创建server_name报错………………等等问题

检查脚本:

@?/rdbms/admin/utltz_upg_check.sql

设置timezone_file脚本:

@?/rdbms/admin/utltz_upg_apply.sql

sqlnet.ora

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8

SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8

SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 10

SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 11

SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 12

--alter   system set resource_manager_plan=default_plan;

grant  administer  database  trigger to SYS          ;

grant  administer  database  trigger to system       ;

--------最后cluster_database=true。

<think>我们面对的问题是将Oracle11gRAC升级Oracle19cRAC的PDB环境。升级过程需要谨慎,因为涉及从较旧版本(11g)到较新版本(19c)的重大跨越,并且还要引入多租户架构(PDB)。根据Oracle的最佳实践,通常我们会采用数据泵导出导入、或使用DBUA(DatabaseUpgradeAssistant)进行升级,但考虑到RAC环境和目标版本的多租户特性,我们需要分阶段进行。参考引用[2]和[4],它们提到了19cRAC环境下的PDB配置和恢复,虽然不直接针对11g升级,但其中关于PDB的配置步骤和环境设置(如环境变量)对我们有参考价值。同时,引用[1]中环境变量的设置也是必要的。升级路径:Oracle11g(11.2.0.4)不能直接升级19c,需要先升级到12.1.0.2版本,然后再升级19c。或者,我们可以使用数据泵导出导入的方法,将数据迁移到新建的19cRACPDB中。在19c中,数据库作为CDB(容器数据库)运行,其中包含PDB(可插拔数据库)。步骤概述:1.准备目标环境:安装Oracle19cRAC软件并创建CDB(容器数据库)。2.将源数据库(Oracle11gRAC升级到中间版本(如12.1.0.2),然后升级19c,或者使用数据泵导出导入的方式将数据迁移到19c的PDB中。由于跨版本较大且涉及架构变化(引入CDB/PDB),推荐使用数据泵导出导入,因为这样可以在迁移的同时完成升级,并且目标环境是一个全新的19cRACCDB,其中包含一个或多个PDB。具体步骤(采用数据泵方式):第一阶段:准备目标环境1.1安装OracleGridInfrastructure19cforRAC。1.2安装OracleRAC19c数据库软件。1.3创建CDB实例(使用DBCA),选择RAC方式创建,并创建为CDB。在创建CDB时,可以选择是否创建PDB,也可以先创建CDB然后手动添加PDB。参考引用[1],确保环境变量正确设置(ORACLE_BASE,ORACLE_HOME,ORACLE_SID等)。第二阶段:导出源数据库(11gRAC)2.1在源数据库(11g)上使用expdp(数据泵导出)导出所需的数据。2.2导出时注意,如果源数据库使用了某些特定的特性(如XMLDB,Spatial等),需要确保目标数据库已经安装了相应的组件。第三阶段:导入到目标PDB3.1在目标19cRACCDB中创建一个新的PDB(使用DBCA或SQL命令)。例如:CREATEPLUGGABLEDATABASEnewpdbADMINUSERpdbadminIDENTIFIEDBYpassword;3.2将导出的数据泵文件复制到目标环境(19cRAC的一个节点上)。3.3使用impdp命令将数据导入到新创建的PDB中。注意,导入时需要指定PDB的名称。例如:impdpsystem/password@rac19c:1521/newpdbdirectory=dpump_dirdumpfile=export.dmplogfile=imp.log第四阶段:升级后处理4.1运行升级后脚本(如果使用数据泵迁移,则不需要运行utlu121s.sql等升级脚本,因为数据泵会自动创建对象的新版本)。4.2检查数据库组件状态:使用SQL>SELECTCOMP_ID,COMP_NAME,STATUSFROMDBA_REGISTRY;4.3收集统计信息。另一种方法是使用DBUA进行升级,但11g升级19c需要经过中间版本,步骤较为繁琐。而且,DBUA只能升级整个CDB,而11g是非CDB数据库,所以升级后将成为非CDB的19c数据库,然后再需要将其转换为PDB并插入到目标CDB中。这种方法操作复杂,风险较高。因此,我们推荐使用数据泵导出导入的方式,虽然数据量较大时耗时较长,但更为清晰和安全。注意事项:-在升级前,需要检查源数据库是否符合升级条件,例如使用ORAchk或Pre-UpgradeInformationTool(utlu121s.sql)进行升级前检查。-如果源数据库字符集不是AL32UTF8,可能需要转换字符集。-需要处理归档日志模式等问题。以上步骤仅供参考,具体操作请根据实际环境和需求进行调整。根据引用[3],在创建PDB后可能还需要配置OGG(OracleGoldenGate)等同步工具,如果不需要同步则可以忽略。相关问题:1.在使用数据泵导入导出进行升级时,有哪些常见错误及如何解决?2.Oracle19cRAC环境中如何管理PDB(如启动、停止、切换)?3.升级后如何测试确保数据完整性和业务连续性?</think> ### Oracle 11g RAC 升级Oracle 19c RAC PDB 的方法和步骤 以下升级流程基于**数据迁移方式**(推荐),结合多租户架构特性,需分阶段操作: --- #### **第一阶段:环境准备** 1. **检查源环境** - 确认 Oracle 11g RAC 版本为 **11.2.0.4**(最低要求)[^1] - 备份所有关键文件: ```bash rman target / <<EOF BACKUP DATABASE PLUS ARCHIVELOG; EOF ``` 2. **部署目标环境** - 在新服务器安装 **Oracle 19c RAC** 并创建 CDB 容器(参考引用[2][^2]): ```sql CREATE DATABASE cdb_root AS CONTAINER DATABASE; ``` - 配置环境变量(参考引用[1][^1]): ```bash ORACLE_SID=cdb_root ORACLE_HOME=/oracle/app/oracle/product/19c/db_1 ``` --- #### **第二阶段:源数据库升级至 12c** > *(11g → 19c 需通过 12c 过渡)* 1. **升级Oracle 12c RAC** - 使用 `DBUA` (Database Upgrade Assistant) 将 11g RAC 升级到 12.1.0.2 - 执行升级后检查: ```sql SELECT * FROM dba_registry WHERE status = 'INVALID'; ``` --- #### **第三阶段:迁移至 19c PDB** 1. **创建目标 PDB** ```sql CREATE PLUGGABLE DATABASE pdb_19c ADMIN USER pdbadmin IDENTIFIED BY password; ``` 2. **迁移数据(两种方案)** **方案一:Data Pump 跨版本导出导入(推荐)** ```bash # 在 12c 源端导出 expdp system/password SCHEMAS=prod_user DIRECTORY=dpump_dir DUMPFILE=11g_data.dmp # 在 19c 目标端导入至 PDB impdp system/password@19c_rac_host:1521/pdb_19c \ DIRECTORY=dpump_dir DUMPFILE=11g_data.dmp REMAP_SCHEMA=prod_user:new_owner ``` **方案二:GoldenGate 实时同步** - 配置 OGG 链路(参考引用[3][^3]),需在目标 PDB 建立同步账户。 3. **验证数据一致性** ```sql ALTER SESSION SET CONTAINER = pdb_19c; EXEC DBMS_UTILITY.compile_schema(schema => 'NEW_OWNER'); ``` --- #### **第四阶段:回切与测试** 1. **应用回切** - 修改应用连接字符串指向新 PDB TNS: ``` (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=scanip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pdb_19c))) ``` - 逐步切换流量(推荐使用负载均衡) 2. **升级后检查** - 使用 `utlusts.sql` 验证升级结果: ```sql @$ORACLE_HOME/rdbms/admin/utlusts.sql ``` - 检查 PDB 状态: ```sql SELECT name, open_mode FROM v$pdbs; ``` --- #### **关键注意事项** 1. **兼容性问题** - 若源库使用 `SPFILE`,需在导入后手动重建(PDB 不可复用非 CDB 参数文件)。 2. **字符集与字节序** 确保源(11g)和目标(19c)字符集一致(推荐 `AL32UTF8`)。 3. **权限继承** 迁移后需在 PDB 内重新授权: ```sql GRANT CREATE SESSION TO new_owner CONTAINER = CURRENT; ``` --- #### **灾备恢复方案** - 若迁移失败,使用备份进行 PDB 级恢复(参考引用[4][^4]): ```sql ALTER PLUGGABLE DATABASE pdb_19c CLOSE; RECOVER PLUGGABLE DATABASE pdb_19c USING BACKUP CONTROLFILE; ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值