rpm 安装oracle 19c,通过补丁升级到19.8

第一次安装rpm包

[root@rac192 oracle]# yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm 
Warning: RPMDB altered outside of yum.
  Installing : oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                      1/1 
'DetachHome' failed.
'AttachHome' failed.
[SEVERE] An error occurred while registering the Oracle home. Verify logs in /var/log/oracle-database-ee-19c/results/oraInstall.log and  for more details and try again.
warning: %post(oracle-database-ee-19c-1.0-1.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package oracle-database-ee-19c-1.0-1.x86_64
  Verifying  : oracle-database-ee-19c-1.0-1.x86_64                                                                                                                                                      1/1 

Installed:
  oracle-database-ee-19c.x86_64 0:1.0-1                                                                                                                                                                     

Complete!
[root@rac192 oracle]# [oracle@rac192 /]$ cd opt/oracle/product/19c/dbhome_1/
[oracle@rac192 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Sep 15 15:37:33 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> 


[oracle@rac192 ~]$ /opt/oracle/product/19c/dbhome_1/OPatch/opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.
[oracle@rac192 ~]$ 

再次安装rpm包

这个文件不对:/etc/oraInst.loc,OPatch不能用,再次强制重新安装

[oracle@rac192 31219897]$ /opt/oracle/product/19c/dbhome_1/OPatch/opatch lsinventory -invPtrLoc /etc/oraInst.loc
.......
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are: 
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
[root@rac192 oracle]# rpm -ivh --force oracle-database-ee-19c-1.0-1.x86_64.rpm 
warning: oracle-database-ee-19c-1.0-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-ee-19c-1.0-1     ################################# [100%]
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configure

安装后再检查

[root@rac192 ~]# cat /etc/oraInst.loc
inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall

opatch终于可以用了!

创建数据库

修改数据库文件目录 /etc/sysconfig/oracledb_ORCLCDB-19c.conf

ORACLE_DATA_LOCATION=/ofsdata/app/oracle/oradata
[root@rac192 ~]# /etc/init.d/oracledb_ORCLCDB-19c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation


51% complete

54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.

Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.
[root@rac192 ~]# 

通过补丁升级到19.8

[oracle@rac192 31281355]$/opt/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /opt/oracle/product/19c/dbhome_1
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.21
OUI version       : 12.2.0.7.0
Log file location : /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-09-15_17-35-09PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

关闭数据库后再升级

[oracle@rac192 31281355]$ /opt/oracle/product/19c/dbhome_1/OPatch/opatch apply    
   [oracle@rac192 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Sep 15 17:52:27 2020
Version 19.8.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> select * from v$version; 

BANNER
--------------------------------------------------------------------------------
BANNER_FULL
--------------------------------------------------------------------------------
BANNER_LEGACY
--------------------------------------------------------------------------------
    CON_ID
----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
	 0

BANNER
--------------------------------------------------------------------------------
BANNER_FULL
--------------------------------------------------------------------------------
BANNER_LEGACY
--------------------------------------------------------------------------------
    CON_ID
----------
                                  

Patch Post-Installation

别忘了: Load Modified SQL Files into the Database
把数据库打开,包括所有的pdb: alter pluggable database all open;

% cd $ORACLE_HOME/OPatch
% ./datapatch -verbose

修复无效的对象

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

修改归档路径

SQL>  archive log list;
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       /ofsdata/app/oracle/oradata/archive
Oldest online log sequence     164
Next log sequence to archive   166
Current log sequence	       166

alter system set log_archive_dest_1='location=/ofsdata/app/oracle/oradata/archive';
姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
<p style="font-size:16px;"> 在本地自己的操作系统上,完全模拟生产环境,让学员跟着视频一步一步搭建一套在RHEL7操作系统上面的oracle19c的rac环境。同时学员还会学会DNS服务器,DNS客户端,NTP服务器,NTP客户端等操作系统知识。让学员在短时间内,oracle和操作系统知识,有一定的提升。让学员可以独自轻松安装一套oracle rac环境。 </p> <p style="font-size:16px;"> <span style="color:#FF0000;">一课程主题</span> </p> <p style="font-size:16px;"> 模拟生产环境,用多路径共享存储,用虚拟软件安装一套RHEL7.5+oracle19c+rac+打补丁 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">二课程特色</span> </p> <ol style="font-size:16px;"> <li> <p> 完成模拟生产环境,用openfiler软件模拟生产惠普的3par存储,用2个虚拟网卡模拟数据库服务器的2个HBA卡。 </p> </li> <li> <p> 课程以实践为主,从头到尾一步一步教学员怎样操作,实践性强 </p> </li> <li> <p> 模拟生产需求,完全可以把这套环境拿到生产环境安装 </p> <p> <br /> </p> </li> </ol> <p style="font-size:16px;"> <span style="color:#FF0000;">三课程内容</span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;"></span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;"></span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">1.课程结束成果演示</span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">  <span style="color:#000000;"> 1.1 用workstation,安装一套rhel7+oracle19c+rac+multipath+共享存储+DNS服务器+DNS客户端+NTP服务器+NTP客户端的生产环境</span></span> </p> <p style="font-size:16px;">    1.2 怎样打oracle19c的rac补丁(包括GI补丁oracle补丁,数据库补丁,OJVM补丁,bug补丁) </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">2.安装openfiler软件,模拟共享存储+配置多路径访问</span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">   </span>2.1安装openfiler软件 </p> <p style="font-size:16px;">    2.2配置openfiler软件(配置2个虚拟网卡,模拟服务器的2个HBA卡) </p> <p style="font-size:16px;">    2.3创建ocr磁盘 </p> <p style="font-size:16px;">    2.4创建mgmt磁盘 </p> <p style="font-size:16px;">    2.5创建数据文件磁盘 </p> <p style="font-size:16px;">    2.6创建归档日志磁盘 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">3.安装2台数据库服务器</span> </p> <p style="font-size:16px;">    3.1安装2台数据库服务器RHEL7.5 </p> <p style="font-size:16px;">    3.2配置服务器双网卡绑定+配置服务器心跳线 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">4.安装多路径软件识别共享存储中的磁盘</span> </p> <p style="font-size:16px;">     4.1安装服务器本地yum源 </p> <p style="font-size:16px;">     4.2安装iscsi软件,配置多路径配置文件,识别共享存储中的磁盘 </p> <p style="font-size:16px;">     4.3识别ocr磁盘 </p> <p style="font-size:16px;">     4.4识别mgmt磁盘 </p> <p style="font-size:16px;">     4.5识别数据文件磁盘 </p> <p style="font-size:16px;">     4.6识别归档日志磁盘 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">5.oracle19c的rac环境系统参数官方说明</span> </p> <p style="font-size:16px;">     5.1如何配置oracle19c的rac的系统参数(我们参考官方说明) </p> <p style="font-size:16px;">     5.2oracle19c+rac环境Best Practices 官方说明文档 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">6.安装oracle19c+rac之前的准备工作</span> </p> <p style="font-size:16px;">     6.1修改/etc/hosts文件 </p> <p style="font-size:16px;">     6.2配置DNS服务器+DNS客户端+NTP服务器+NTP客户端 </p> <p style="font-size:16px;">     6.3创建用户和组 </p> <p style="font-size:16px;">     6.4创建目录 </p> <p style="font-size:16px;">     6.5修改用户环境变量 </p> <p style="font-size:16px;">     6.6安装相关软件包 </p> <p style="font-size:16px;">     6.7配置ssh互信 </p> <p style="font-size:16px;">     6.9禁用服务器透明大页 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">7.安装oracle+19c+rac软件</span> </p> <p style="font-size:16px;">    7.1安装GI软件 </p> <p style="font-size:16px;">    7.2创建ASM磁盘,主要是数据文件磁盘和归档日志磁盘 </p> <p style="font-size:16px;">    7.3安装数据库软件 </p> <p style="font-size:16px;">    7.4创建数据库实例 </p> <p style="font-size:16px;">    7.5日常常用维护集群命令(启停数据库,启停集群,查看监听,教同学们怎样不死记命令,而且命令还正确) </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">8.打补丁</span> </p> <p style="font-size:16px;">   8.1打GI和ORACLE的操作系统补丁 </p> <p style="font-size:16px;">   8.2打OJVM补丁 </p> <p style="font-size:16px;">   8.3打ORA600的bug补丁 </p> <p style="font-size:16px;"> <br /> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">9.课程总结和成果演示</span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;"> <span style="color:#000000;">9.1课程总结和成果演示</span></span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;"><br /> </span> </p> <p style="font-size:16px;"> <span style="color:#FF0000;">四学习必要工具</span> </p> <ol style="font-size:16px;"> <li> <p> 安装workstation软件   </p> </li> <li> <p> 官网下载openfiler,rhel7.5软件 </p> </li> <li> <p> 下载oracle软件(包括19.3的rac安装包,19.4的补丁) </p> <p> 以上软件我都已经在视频里面做了下载地址说明 </p> </li> <li> <div> <br /> </div> </li> </ol>
相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页