重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 541|回复: 0

[升级] Centos7.8安装11G并升级至19C

[复制链接]
发表于 2020-5-22 16:51:10 | 显示全部楼层 |阅读模式
本帖最后由 windjack 于 2020-5-22 17:13 编辑

Centos7.8  安装11.2.0.4  并升级到19.3 完整测试文档

环境介绍
VM版本:VMware® Workstation 15 Pro
OS版本:CentOS Linux release 7.8.2003(Core) x86_64
ORACLE:11.2.0.4 UPGRADE TO 19.3.0
HOSTNAME:dbserver
HOST-IP:192.168.133.120
OS磁盘(boot和/):40G
ORACLE软件安装磁盘:/dev/sdb1,挂载点/u01,大小40G
ASM磁盘:oracleasm_lib(data01至data07,2G一块,共14G,其中4块用于数据盘,3块用于快速恢复区)
11g GI BASE:/u01/app/grid
11g GI HOME:/u01/app/grid/product/11.2.0/grid
11g DB BASE:/u01/app/oracle
11g DB HOME:/u01/app/oracle/product/11.2.0/db_1
19c GI BASE:/u01/app/grid
19c GI HOME:/u01/app/grid/product/19.3.0/grid
19c DB BASE:/u01/app/oracle
19c DB HOME:/u01/app/oracle/product/19.3.0/db_1
安装文件目录:/setup

上传所有需要的文件到/setup
oracleasmlib:kmod-oracleasm-2.0.8-21.0.1.el7.x86_64.rpm
      oracleasmlib-2.0.12-1.el7.x86_64.rpm
       oracleasm-support-2.1.11-2.el7.x86_64.rpm
11g db:      p13390677_112040_Linux-x86-64_1of7.zip
        p13390677_112040_Linux-x86-64_2of7.zip
11g gi:      p13390677_112040_Linux-x86-64_3of7.zip
11g gi补丁    p18370031_112040_Linux-x86-64.zip
11g PSU:     p30805461_112040_Linux-x86-64.zip
Opatch:      p6880880_112000_Linux-x86-64_3.25.zip
19C db:      LINUX.X64_193000_db_home.zip
19C gi:      LINUX.X64_193000_grid_home.zip

关闭防火墙
[root@dbserver ~]# systemctl stop firewalld.service
[root@dbserver ~]# systemctl disable firewalld.service     

关闭Selinux
[root@dbserver ~]# vim /etc/selinux/config
SELINUX=disabled

修改hosts
[root@dbserver ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4localhost4.localdomain4
::1         localhost localhost.localdomainlocalhost6 localhost6.localdomain6
192.168.133.120 dbserver

挂载ISO文件到/mnt
[root@dbserver yum.repos.d]#mount -t iso9660 /dev/sr0 /mnt
mount: /dev/sr0 iswrite-protected, mounting read-only
配置本地ISO YUM源
[root@dbserver yum.repos.d]# vim iso.repo
[base]
name=yum source
baseurl=file:///mnt
enabled=1
gpgcheck=0
[root@dbserver yum.repos.d]# yum makecache

磁盘分区
[root@dbserver ~]# fdisk /dev/sdb
创建文件系统
[root@dbserver ~]# mxfs -t xfs/dev/sdb1
创建挂载点
[root@dbserver ~]# mkdir /u01
设置永久挂载点:
[root@dbserver ~]# vim /etc/fstab
加入这一行:    /dev/sdb1 /u01  xfs defaults 0 0

创建组
[root@dbserver ~]# groupadd dba
[root@dbserver ~]# groupadd oinstall
[root@dbserver ~]# groupadd oper
[root@dbserver ~]# groupadd asmdba
[root@dbserver ~]# groupadd asmadmin
[root@dbserver ~]# groupadd asmoper
创建用户
[root@dbserver ~]# useradd -g oinstall -G dba,asmadmin,asmdba,asmoper grid
[root@dbserver ~]# useradd -g oinstall -G dba,oper,asmdba oracle
修改用户密码
[root@dbserver ~]# echo "oracle" |passwd --stdin oracle
[root@dbserver ~]# echo "grid" |passwd --stdin grid
创建目录
[root@dbserver ~]# mkdir -p/u01/app/grid
[root@dbserver ~]# mkdir -p/u01/app/grid/product/11.2.0/grid
[root@dbserver ~]# mkdir -p/u01/app/grid/product/19.3.0/grid
[root@dbserver ~]# mkdir -p/u01/app/oracle
[root@dbserver ~]# mkdir -p/u01/app/oracle/product/11.2.0/db_1
[root@dbserver ~]# mkdir -p/u01/app/oracle/product/19.3.0/db_1
分配权限
[root@dbserver ~]# chown -R grid:oinstall /u01/app
[root@dbserver ~]# chown -R oracle:oinstall /u01/app/oracle
[root@dbserver ~]# chmod -R 775/u01/app

设置grid用户环境变量
[root@dbserver ~]# su - grid
[grid@dbserver ~]$ vim .bash_profile
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
exportORACLE_HOME=/u01/app/grid/product/11.2.0/grid
exportPATH=$ORACLE_HOME/bin:$PATH

设置oracle用户环境变量
[root@dbserver ~]# su - oracle
[grid@dbserver ~]$ vim .bash_profile
export ORACLE_SID=orcl
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
exportPATH=$ORACLE_HOME/bin:$PATH

安装oracleasmlib
[root@dbserver setup]# rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm oracleasm-support-2.1.11-2.el7.x86_64.rpm kmod-oracleasm-2.0.8-26.0.1.el7.x86_64.rpm

初始化oracleasm
[root@dbserver u01]# oracleasm configure -i
Configuring the Oracle ASMlibrary driver.
This will configure the on-boot propertiesof the Oracle ASM library
driver.  The following questions will determinewhether the driver is
loaded on boot and whatpermissions it will have.  The currentvalues
will be shown in brackets('[]').  Hitting <ENTER> withouttyping an
answer will keep that currentvalue.  Ctrl-C will abort.
Default user to own the driverinterface []: grid
Default group to own the driverinterface []: asmadmin
Start Oracle ASM library driveron boot (y/n) [n]: y
Scan for Oracle ASM disks onboot (y/n) [y]: y
Writing Oracle ASM librarydriver configuration: done

[root@dbserver u01]# oracleasm init

ASM磁盘分区(每个磁盘分一个区)
[root@dbserver ~]# fdisk /dev/sdc
[root@dbserver ~]# fdisk /dev/sdd
[root@dbserver ~]# fdisk /dev/sde
[root@dbserver ~]# fdisk /dev/sdf
[root@dbserver ~]# fdisk /dev/sdg
[root@dbserver ~]# fdisk /dev/sdh
[root@dbserver ~]# fdisk /dev/sdi
分区生效
[root@dbserver ~]# partprobe

创建ASM盘
[root@dbserver ~]# oracleasm createdisk data01 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data02 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data03 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data04 /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data05 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data06 /dev/sdh1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data07 /dev/sdi1
Writing disk header: done
Instantiating disk: done
查看创建ASM盘信息:
[root@dbserver ~]# oracleasm listdisks
DATA01
DATA02
DATA03
DATA04
DATA05
DATA06
DATA07

安装相关的系统依赖包
yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 glibc glbic-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel unixODBC-devel sysstat ksh unzip compat-libcap*


解压目录的创建
[root@dbserver ~]# mkdir /setup/oracle/
[root@dbserver ~]# mkdir /setup/grid
[root@dbserver ~]# chown grid:oinstall /setup/grid
[root@dbserver ~]# chown oracle:oinstall /setup/oracle


安装11G GI
[root@dbserver ~]# su - grid
[grid@dbserver ~]unzip p13390677_112040_Linux-x86-64_3of7.zip -d /setup/grid/
设置DISPLAY环境变量
[grid@dbserver ~]$ expor tDISPLAY=192.168.133.1:0.0
开启Xmanager passsive
在WINDOWS宿主机安装了XMANAGER后,就有该工具
在WINDOWS宿主机命令行输入或者直接双击打开:Xmanager - Passive
[grid@dbserver ~]$ cd /u01/setup/grid/grid/
[grid@dbserver grid]$./runInstaller
...
...
755255ec790ae2d9ac.png

root.sh脚本之前打补丁18370031(如果是RAC的话所有节点都要打)
[grid@dbserver ~]$ cd $ORACLE_HOME
[grid@dbserver grid]$ cd OPatch/
[grid@dbserver OPatch]$ pwd
/u01/app/grid/product/11.2.0/grid/OPatch
[grid@dbserver OPatch]$ ./opatch apply /setup/18370031/
Oracle Interim Patch Installerversion 11.2.0.3.4
Copyright (c) 2012, OracleCorporation.  All rights reserved.
Oracle Home       : /u01/app/grid/product/11.2.0/grid
Central Inventory :/u01/app/oraInventory
   from           :/u01/app/grid/product/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location :/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatch/18370031_May_13_2020_14_13_01/apply2020-05-13_14-13-00PM_1.log
Applying interim patch'18370031' to OH '/u01/app/grid/product/11.2.0/grid'
Verifying environment andperforming prerequisite checks...
All checks passed.
Please shutdown Oracle instancesrunning out of this ORACLE_HOME on the local system.
(Oracle Home ='/u01/app/grid/product/11.2.0/grid')
Is the local system ready for patching?[y|n]
y
User Responded with: Y
Backing up files...
Patching component oracle.crs,11.2.0.4.0...
Verifying the update...
Patch 18370031 successfullyapplied
Log file location:/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatch/18370031_May_13_2020_14_13_01/apply2020-05-13_14-13-00PM_1.log
OPatch succeeded.

[root@dbserver ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of/u01/app/oraInventory.
Adding read,write permissionsfor group.
Removing read,write,executepermissions for world.
Changing groupname of/u01/app/oraInventory to oinstall.
The execution of the script iscomplete.

[root@dbserver ~]# /u01/app/grid/product/11.2.0/grid/root.sh
Performing root user operationfor Oracle 11g
The following environmentvariables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/grid/product/11.2.0/grid
Enter the full pathname of thelocal 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.
Creating /etc/oratab file...
Entries will be added to the/etc/oratab file as needed by
Database Configuration Assistantwhen a database is created
Finished running generic part ofroot script.
Now product-specific rootactions will be performed.
Using configuration parameterfile: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulatednecessary OCR keys.
Creating OCR keys for user'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dbserversuccessfully pinned.
Adding Clusterware entries to oracle-ohasd.service
dbserver     2020/05/13 14:49:41    /u01/app/grid/product/11.2.0/grid/cdata/dbserver/backup_20200513_144941.olr
Successfully configured OracleGrid Infrastructure for a Standalone Server

创建FRA磁盘组
[grid@dbserver grid]$ asmca
187855ec790d819323.png


安装11G数据库
[oracle@dbserver ~]$ export DISPLAY=192.168.133.1:0.0
[oracle@dbserver setup]$ unzip p13390677_112040_Linux-x86-64_1of7.zip -d /setup/oracle/
[oracle@dbserver setup]$ unzip p13390677_112040_Linux-x86-64_2of7.zip -d /setup/oracle/
[oracle@dbserver setup]$ cd /setup/oracle/database
[oracle@dbserver database]$./runInstaller
...
...
598915ec790eedd8b2.png
CENTOS7安装11G会出现上面这种错误,处理办法:
[root@pacsdb1 db_1]# cd /u01/app/oracle/product/11.2.0/db_1/sysman/lib/
[root@pacsdb1 lib]# vim ins_emagent.mk
#  emdctl
#===========================
$(SYSMANBIN)emdctl:
       $(MK_EMAGENT_NMECTL)-lnnz11

在上面文件中后面加上-lnnz11,保存后点击retry继续运行安装。
502735ec791036e9b7.png


[root@dbserver lib]#/u01/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operationfor Oracle 11g
The following environmentvariables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of thelocal 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 Assistantwhen a database is created
Finished running generic part ofroot script.
Now product-specific rootactions will be performed.
Finished product-specific rootactions.


创建DB实例
[oracle@dbserver database]$ dbca
...
...
230405ec7912c974c2.png



11G升级到19C之前需要安装PSU补丁
为GI和DB安装PSU补丁30805461 ,此版本需要OPatch版本11.2.0.3.23及以后版本。
登录DB和GI用户各自解压OPatch11.2.0.3.25到自己的的HOME目录下覆盖原来的版本:
[grid@dbserver setup]$unzipp6880880_112000_Linux-x86-64_3.25.zip -d /u01/app/grid/product/11.2.0/grid
[oracle@dbserver setup]$ unzipp6880880_112000_Linux-x86-64_3.25.zip -d /u01/app/oracle/product/11.2.0/db_1
验证OPatch版本
[grid@dbserver OPatch]$ ./opatchversion
OPatch Version: 11.2.0.3.25
OPatch succeeded.
[oracle@dbserver OPatch]$./opatch version
OPatch Version: 11.2.0.3.25
OPatch succeeded.

使用GRID用户解压补丁30805461 到/setup/grid/psu目录下    (说明:这里一定要使用GRID用户解压
[grid@dbserver setup]$ ls -ltr /setup/grid/psu-d
drwxr-xr-x 3 grid oinstall 22May 14 09:27 /setup/grid/psu
[grid@dbserver setup]$ unzip p30805461_112040_Linux-x86-64.zip -d /setup/grid/psu/

安装补丁
使用ROOT用户一次性针对GI和DB进行补丁安装
[root@dbserver setup]# /u01/app/grid/product/11.2.0/grid/OPatch/opatchauto /setup/grid/psu/30805461/
/u01/app/grid/product/11.2.0/grid/OPatch/opatchauto /setup/psu/30805461/
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl/u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /setup/psu-patchn 30805461 -paramfile/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
This is the main log file:/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2020-05-14_09-30-27.log
This file will show yourdetected configuration and all the steps that opatchauto attempted to do onyour system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2020-05-14_09-30-27.report.log
2020-05-14 09:30:27: StartingOracle Restart Patch Setup
Using configuration parameterfile: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC/u01/app/oracle/product/11.2.0/db_1 ...
Stopped RAC/u01/app/oracle/product/11.2.0/db_1 successfully
patch/setup/psu/30805461/29938455/custom/server/29938455  apply successful for home  /u01/app/oracle/product/11.2.0/db_1
patch/setup/psu/30805461/30670774  applysuccessful for home /u01/app/oracle/product/11.2.0/db_1
Stopping CRS...
Stopped CRS successfully
patch/setup/psu/30805461/29938455  applysuccessful for home /u01/app/grid/product/11.2.0/grid
patch/setup/psu/30805461/30670774  applysuccessful for home /u01/app/grid/product/11.2.0/grid
patch/setup/psu/30805461/29509309  apply successfulfor home /u01/app/grid/product/11.2.0/grid
Starting CRS...
CRS-4123: Oracle HighAvailability Services has been started.
Starting RAC/u01/app/oracle/product/11.2.0/db_1 ...
Started RAC/u01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.

DB中补丁应用
[oracle@dbserver ~]$ sqlplus  /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL>@?/rdbms/admin/catbundle.sql psu apply


升级数据库到19C

解压安装文件
[grid@dbserver setup]$ unzip LINUX.X64_193000_grid_home.zip -d/u01/app/grid/product/19.3.0/grid/
[oracle@dbserver setup]$ unzip LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/db_1/

升级GI
[grid@dbserver setup]$ export DISPLAY=192.168.133.1:0.0
[grid@dbserver setup]$/u01/app/grid/product/19.3.0/grid/gridSetup.sh
184435ec7914bacacc.png
弹出的揭示信息要求关闭数据库实例后再点YES继续。
233605ec791522625b.png
716955ec791591ccf5.png
830965ec79160385e0.png
214865ec7916bc1bde.png
782095ec79172081a8.png
前提条件检查项需要修改ASM磁盘组兼容性设置到11.2.0.2,去grid用户进行修改。
[grid@dbserver ~]$ asmcmd
ASMCMD> setattr -G DATA compatible.asm 11.2.0.2.0
ASMCMD> setattr -G FRA compatible.asm 11.2.0.2.0
其它警告信息在ROOT中执行自动修复脚本进行处理
[root@dbserver setup]#/tmp/GridSetupActions2020-05-14_10-14-40AM/CVU_19.0.0.0.0_grid/runfixup.sh
444855ec7917d1bb74.png
150755ec791857bc00.png
183565ec7918f5341c.png

[root@dbserver setup]#/u01/app/grid/product/19.3.0/grid/rootupgrade.sh
Performing root user operation.
The following environmentvariables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME= /u01/app/grid/product/19.3.0/grid
Enter the full pathname of thelocal bin directory: [/usr/local/bin]:
The file "dbhome"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the/etc/oratab file as needed by
Database Configuration Assistantwhen a database is created
Finished running generic part ofroot script.
Now product-specific rootactions will be performed.
Using configuration parameterfile: /u01/app/grid/product/19.3.0/grid/crs/install/crsconfig_params
The log of current session canbe found at:
/u01/app/grid/crsdata/dbserver/crsconfig/roothas_2020-05-14_10-26-04AM.log
2020/05/14 10:26:06 CLSRSC-595:Executing upgrade step 1 of 12: 'UpgPrechecks'.
2020/05/14 10:26:08 CLSRSC-595:Executing upgrade step 2 of 12: 'GetOldConfig'.
2020/05/14 10:26:10 CLSRSC-595:Executing upgrade step 3 of 12: 'GenSiteGUIDs'.
2020/05/14 10:26:10 CLSRSC-595:Executing upgrade step 4 of 12: 'SetupOSD'.
2020/05/14 10:26:10 CLSRSC-595:Executing upgrade step 5 of 12: 'PreUpgrade'.
ASM has been upgraded andstarted successfully.
2020/05/14 10:29:42 CLSRSC-595:Executing upgrade step 6 of 12: 'UpgradeAFD'.
2020/05/14 10:29:42 CLSRSC-595:Executing upgrade step 7 of 12: 'UpgradeOLR'.
clscfg: EXISTING configurationversion 0 detected.
Creating OCR keys for user'grid', privgrp 'oinstall'..
Operation successful.
2020/05/14 10:29:46 CLSRSC-595:Executing upgrade step 8 of 12: 'UpgradeOCR'.
LOCAL ONLY MODE
Successfully accumulatednecessary OCR keys.
Creating OCR keys for user'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dbserversuccessfully pinned.
2020/05/14 10:29:49 CLSRSC-595:Executing upgrade step 9 of 12: 'CreateOHASD'.
2020/05/14 10:29:50 CLSRSC-595:Executing upgrade step 10 of 12: 'ConfigOHASD'.
2020/05/14 10:29:50 CLSRSC-329:Replacing Clusterware entries in file 'oracle-ohasd.service'
2020/05/14 10:30:37 CLSRSC-595:Executing upgrade step 11 of 12: 'UpgradeSIHA'.
dbserver     2020/05/14 10:31:45    /u01/app/grid/crsdata/dbserver/olr/backup_20200514_103145.olr     724960844     
dbserver     2020/05/13 14:49:41    /u01/app/grid/product/11.2.0/grid/cdata/dbserver/backup_20200513_144941.olr     -   
2020/05/14 10:31:45 CLSRSC-595:Executing upgrade step 12 of 12: 'InstallACFS'.
2020/05/14 10:33:19 CLSRSC-327:Successfully configured Oracle Restart for a standalone server
970685ec791a1a97b0.png



升级DB软件
启动实例
SQL> startup
ORACLE instance started.
Total System Global Area3256942592 bytes
Fixed Size                  2257640 bytes
Variable Size            1879051544 bytes
Database Buffers         1358954496 bytes
Redo Buffers               16678912 bytes
Database mounted.
Database opened.
[oracle@dbserver db_1]$ export DISPLAY=192.168.133.1:0.0
[oracle@dbserver db_1]$/u01/app/oracle/product/19.3.0/db_1/runInstaller
931665ec791aa6f68f.png
114135ec791afae8cb.png
737175ec791b4ed760.png
493245ec791bc39c43.png
446885ec791c1513d0.png
592905ec791c6ed692.png
112435ec791cd8fcb1.png
243535ec791d332bcb.png
202125ec791d9a1cde.png
[root@dbserver setup]#/u01/app/oracle/product/19.3.0/db_1/root.sh
Performing root user operation.
The following environmentvariables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.3.0/db_1
Enter the full pathname of thelocal bin directory: [/usr/local/bin]:
The file "dbhome"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv"already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the/etc/oratab file as needed by
Database Configuration Assistantwhen a database is created
Finished running generic part ofroot script.
Now product-specific rootactions will be performed.
Oracle Trace File Analyzer (TFA- Standalone Mode) is available at :
   /u01/app/oracle/product/19.3.0/db_1/bin/tfactl
Note :
1. tfactl will use TFA Serviceif that service is running and user has been granted access
2. tfactl will configure TFAStandalone Mode only if user has no access to TFA Service or TFA is notinstalled
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image122.gif
203075ec791ece1319.png


升级DB实例
[oracle@dbserver db_1]$/u01/app/oracle/product/19.3.0/db_1/bin/dbua
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image124.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image126.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image128.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image130.gif
如果是生产库请在升级前做好数据库备份或者保证还原点。
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image132.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image134.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image136.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image138.gif
file:///C:\Users\lg\AppData\Local\Temp\msohtmlclip1\01\clip_image140.gif
102415ec7920e1fb5a.png
654625ec792194054b.png
98195ec7921f28010.png
298215ec792250a8e1.png
309255ec7922b1e552.png
130885ec79233307ef.png
191845ec79238b4210.png
706735ec7923f8deb8.png
837465ec7924634e81.png

修改用户环境变量
[oracle@dbserver ~]$ vim .bash_profile
export PATH
export ORACLE_SID=orcl
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=/u01/app/oracle/product/19.3.0/db_1
exportPATH=$ORACLE_HOME/bin:$PATH
[grid@dbserver ~]$ vim .bash_profile
export PATH
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
exportORACLE_HOME=/u01/app/grid/product/19.3.0/grid
exportPATH=$ORACLE_HOME/bin:$PATH

验证升级结果
[grid@dbserver setup]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE       SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE      dbserver                                    
ora.FRA.dg
               ONLINE  ONLINE      dbserver                                    
ora.LISTENER.lsnr
               ONLINE  ONLINE      dbserver                                    
ora.asm
               ONLINE  ONLINE      dbserver                Started            
ora.ons
               OFFLINE OFFLINE      dbserver                                    
-------------------------------------------------------------------------------
Cluster Resources
-------------------------------------------------------------------------------
ora.cssd
      1       ONLINE  ONLINE       dbserver                                    
ora.diskmon
      1       OFFLINE OFFLINE                                                  
ora.evmd
      1       ONLINE  ONLINE       dbserver                                    
ora.orcl.db
      1       ONLINE  ONLINE       dbserver               
Open,HOME=/u01/app/
oracle/product/19.3.0/db_1

[oracle@dbserver product]$sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 -Production on Thu May 14 11:56:20 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019,Oracle.  All rights reserved.
Connected to:
Oracle Database 19c EnterpriseEdition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select open_mode fromv$database;
OPEN_MODE
--------------------
READ WRITE
完成
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2020-11-28 13:19 , Processed in 0.179874 second(s), 24 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表