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

简介: 第一次安装rpm包

第一次安装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
1
[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';
相关文章
|
2月前
|
SQL Oracle 关系型数据库
Oracle 19c OCP 认证考试 082 题库(第19题)- 2024年修正版
【优技教育】提供2024年修正版Oracle 19c OCP 082题库,共90题,需60%分数通过,考试时间为150分钟。文档包含详细解析,禁止未授权转载。OCP认证需在Oracle指定机构培训后参加考试,通过082(60%)和083(57%)两门科目方可获得证书。
62 8
|
22天前
|
存储 Oracle 关系型数据库
|
13天前
|
Oracle 关系型数据库 网络安全
Oracle 19c 安装教程学习
Oracle 19c 安装教程学习
40 2
|
2月前
|
Oracle 关系型数据库 数据库
Oracle 19c OCP 认证考试 083 题库(第37题)- 2024年修正版
本文介绍Oracle 19c OCP认证题库中的1Z0-083科目,包含85道试题,需在150分钟内完成,通过分数为57%。重点解析了关于阈值、指标和警报的问题,并指出需通过Oracle指定的WDP机构培训后才能参加考试,考试科目包括082和083,通过后可获得OCP证书。CUUG作为金牌合作机构,提供详细咨询与帮助。
80 1
|
2月前
|
Oracle 关系型数据库
Oracle 19c OCP 认证考试 082 题库(第24题)- 2024年修正版
这是关于Oracle 19c OCP认证考试082题库的修正版,包含90道题目,通过分数为60%,考试时间为150分钟。本文由CUUG原创整理,解析了考试题目,并提供了正确答案和详细解释。通过该认证需完成两门科目考试,合格后可获得OCP证书。
47 4
|
2月前
|
SQL Oracle 关系型数据库
Oracle 19c OCP 认证考试 082 题库(第26题)- 2024年修正版
这是关于Oracle 19c OCP认证考试(1Z0-082)的题库,包含90道题目,通过分数为60%,考试时间为150分钟。本文由CUUG原创整理,重点解析了全球临时表的特点和相关操作,并提供了正确答案及详细解释,帮助考生更好地理解和备考。
33 2
|
2月前
|
Oracle 关系型数据库 数据库
Oracle 19c OCP 认证考试 082 题库(第22题)- 2024年修正版
这是【优技教育】提供的Oracle 19c OCP认证考试082题库修正版,包含90道题目,通过分数为60%,考试时间为150分钟。文章详细解析了第22题,并指出正确答案为B。OCP认证需在Oracle指定的WDP机构培训后参加考试,通过082和083两科方可获得证书。CUUG作为金牌合作机构,可助您快速通过考试。
64 5
|
2月前
|
Oracle 关系型数据库
Oracle 19c OCP 认证考试 082 题库(第18题)- 2024年修正版
这是优技教育提供的Oracle 19c OCP认证考试082题库的2024年修正版,包含90道题目,通过分数为60%,考试时间为150分钟。本文为CUUG原创整理,详细解析了第18题的选择题,并提供了正确答案与解释。需注意,OCP认证需在Oracle指定的WDP机构培训后才能参加考试。
64 7
|
2月前
|
SQL Oracle 关系型数据库
【优技教育】Oracle 19c OCP 082题库(第16题)- 2024年修正版
这是优技教育提供的Oracle 19c OCP认证考试082题库的2024年修正版,包含90道题目,通过分数为60%,考试时间为150分钟。本文解析了题库中的第16题,并详细解释了标量子查询的相关概念与用法,强调其在SQL语句中的嵌套应用及其优势。通过解析帮助考生更好地理解考试内容。原文链接:http://www.cuug.com/index.php?s=/home/article/detail/id/3397.html。
41 7
|
2月前
|
Oracle 关系型数据库
Oracle 19c OCP 认证考试 082 题库(第20题)- 2024年修正版
这是2024年修正版的Oracle 19c OCP认证题库,包含1Z0-082科目共90题,通过分数为60%,考试时间为150分钟。本文由CUUG原创整理,解析了题库中的第20题,并解释了实体关系相关概念。获得OCP认证需通过082和083两门考试。
66 1