学堂 学堂 学堂公众号手机端

oracle 11.2.0.1 dbua+手动 升级11.2.0.3

lewis 5年前 (2020-11-13) 阅读数 7 #技术
文档课题:oracle 11.2.0.1 dbua+手动 升级11.2.0.3
系统:rhel 6.5 64位
数据库:oracle 11.2.0.1 64位
环境:单实例+非asm存储
1、数据确认
数据库原数据确认.
[oracle@liujun ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 25 14:55:55 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

> create table test as select * from user_objects;

Table created.

> select count(*) from test;

COUNT(*)
----------
30807

> set linesize 150
> set pagesize 9999
> col comp_name format a40
> select comp_name,version,status from dba_registry;

COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ --------------------------------------------
OWB 11.2.0.1.0 VALID
Oracle Application Express 3.2.1.00.10 VALID
Oracle Enterprise Manager 11.2.0.1.0 VALID
OLAP Catalog 11.2.0.1.0 VALID
Spatial 11.2.0.1.0 VALID
Oracle Multimedia 11.2.0.1.0 VALID
Oracle XML Database 11.2.0.1.0 VALID
Oracle Text 11.2.0.1.0 VALID
Oracle Expression Filter 11.2.0.1.0 VALID
Oracle Rules Manager 11.2.0.1.0 VALID
Oracle Workspace Manager 11.2.0.1.0 VALID
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
OLAP Analytic Workspace 11.2.0.1.0 VALID
Oracle OLAP API 11.2.0.1.0 VALID

18 rows selected.
2、升级准备
2.1、创建目录
首先创建11.2.0.3 DB软件的安装路径.
# mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0.3
2.2、文件处理
# mkdir -p /u01/setup/11.2.0.3
sftp> cd /u01/setup/11.2.0.3
sftp> lcd F:\installmedium\11g\11.2.0.3\Linux_64bit
sftp> put p10404530_112030_Linux-x86-64_1of7.zip
sftp> put p10404530_112030_Linux-x86-64_2of7.zip
# chown -R oracle:oinstall /u01/setup/11.2.0.3
$ cd /u01/setup/11.2.0.3/
$ unzip -q p10404530_112030_Linux-x86-64_1of7.zip
$ unzip -q p10404530_112030_Linux-x86-64_2of7.zip
3、DBUA升级
3.1、软件升级
oracle database软件安装.
[oracle@liujun database]$ export DISPLAY=192.168.133.1:0.0
$ ./runInstaller

注意:此处选择“Upgrade an existing database”.


#/u01/app/oracle/product/11.2.0.3/db_1/root.sh
3.2、监听配置
说明:DB软件升级过程中,监听配置会自动弹出,配置到最新ORACLE_HOME目录.

3.3、实例升级
说明:DB软件升级过程中,会自动弹出升级实例窗口,可以选择“Cancel”,待DB软件安装好后,届时在选择使用DBUA或手动升级实例.
此处选择是“Next”,在安装DB软件的过程中就升级实例.

升级时间:15:31—15:45.

3.4、数据验证
首先将.bash_profile中的ORACLE_HOME按如下进行修改.
$ cat .bash_profile
……
#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1
……
$ source .bash_profile
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sun Sep 25 15:47:39 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE
> set linesize 150
> set pagesize 9999
> col comp_name format a40
> select comp_name,version,status from dba_registry

COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ --------------------------------------------
OWB 11.2.0.1.0 VALID
Oracle Application Express 3.2.1.00.10 VALID
Oracle Enterprise Manager 11.2.0.3.0 VALID
OLAP Catalog 11.2.0.3.0 VALID
Spatial 11.2.0.3.0 VALID
Oracle Multimedia 11.2.0.3.0 VALID
Oracle XML Database 11.2.0.3.0 VALID
Oracle Text 11.2.0.3.0 VALID
Oracle Expression Filter 11.2.0.3.0 VALID
Oracle Rules Manager 11.2.0.3.0 VALID
Oracle Workspace Manager 11.2.0.3.0 VALID
Oracle Database Catalog Views 11.2.0.3.0 VALID
Oracle Database Packages and Types 11.2.0.3.0 VALID
JServer JAVA Virtual Machine 11.2.0.3.0 VALID
Oracle XDK 11.2.0.3.0 VALID
Oracle Database Java Packages 11.2.0.3.0 VALID
OLAP Analytic Workspace 11.2.0.3.0 VALID
Oracle OLAP API 11.2.0.3.0 VALID

18 rows selected.

SQL> select count(*) from test;

COUNT(*)
----------
30807

4、手动升级
说明:在安装11.2.0.3的DB软件过程中,出现以下图形界面时选择”Cancel”,届时采用手动升级方式升级实例.

点击”Cancel”后,出现如下界面,然后点击”Skip”.

4.1、utlu112i.sql
安装好11.2.0.3 RDBMS 软件后,用此前的ORACLE_HOME启动 11.2.0.1实例,对正在运行的实例执行 11.2.0.3 的$ORACLE_HOME/rdbms/admin/utlu112i.sql脚本.
[oracle@liujun database]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 25 15:26:14 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

> spool /home/oracle/utlu112i.log
> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 09-25-2022 15:29:09
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: ORCL
--> version: 11.2.0.1.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V11
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 688 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 465 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.

--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.

**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.2.0.1.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

EXECUTE dbms_stats.gather_dictionary_stats;

**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.

To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'

Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

> spool off
4.2、dbupgdiag.sql
此脚本为升级前后诊断数据库状态提供非常友好的输出。脚本将生成一个名为db_upg_diag
_.log的文件。该脚本需sys用户在SQL*Plus中运行,且升级前后都要执行,判定升级前后数据库的状态。
sftp> lcd F:\install_upgrade\upgrade\upgrade_sql
sftp> cd /home/oracle
sftp> put dbupgdiag.sql
SQL> @/home/oracle/dbupgdiag.sql

Enter location for Spooled output:

Enter value for 1: /home/oracle

25_Sep_2022_0359 .log

orcl_



*** Start of LogFile ***

Oracle Database Upgrade Diagnostic Utility 09-25-2022 15:59:38

===============
Hostname
===============

liujun

===============
Database Name
===============

ORCL

===============
Database Uptime
===============

15:14 25-SEP-22

=================
Database Wordsize
=================

This is a 64-bit database

================
Software Version
================

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

=============
Compatibility
=============

Compatibility is set as 11.2.0.0.0

================
Archive Log Mode
================

Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/archivelog
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9

================
Auditing Check
================


NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /u01/app/oracle/admin/orcl/adu
mp
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB

================
Cluster Check
================

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1

DOC>################################################################
DOC>
DOC> If CLUSTER_DATABASE is set to TRUE, change it to FALSE before
DOC> upgrading the database
DOC>
DOC>################################################################
DOC>#

===========================================
Tablespace and the owner of the aud$ table ( IF Oracle Label Security and Oracle Database Vault are installed then aud$ will be in SYSTEM.AUD$)
===========================================

OWNER TABLESPACE_NAME
------------ ------------------------------
SYS SYSTEM

============================================================================
count of records in the sys.aud$ table where dbid is null- Standard Auditing
============================================================================


0


============================================================================================
count of records in the system.aud$ when dbid is null, Std Auditing with OLS or DV installed
============================================================================================
select count(*) from system.aud$ where dbid is null
*
ERROR at line 1:
ORA-00942: table or view does not exist




=============================================================================
count of records in the sys.fga_log$ when dbid is null, Fine Grained Auditing
=============================================================================

0



==========================================
Oracle Label Security is installed or not
==========================================

Oracle Label Security is NOT installed at database level

================
Number of AQ Records in Message Queue Tables
================

SYS - ALERT_QT - 0
SYS - AQ$_MEM_MC - 0
SYS - AQ_EVENT_TABLE - 0
SYS - AQ_PROP_TABLE - 0
SYS - KUPC$DATAPUMP_QUETAB - 0
SYS - SCHEDULER$_EVENT_QTAB - 0
SYS - SCHEDULER$_REMDB_JOBQTAB - 0
SYS - SCHEDULER_FILEWATCHER_QT - 0
SYS - SYS$SERVICE_METRICS_TAB - 0
SYSMAN - MGMT_LOADER_QTABLE - 0
SYSMAN - MGMT_NOTIFY_INPUT_QTABLE - 0
SYSMAN - MGMT_NOTIFY_QTABLE - 0
SYSMAN - MGMT_PAF_MSG_QTABLE_1 - 0
SYSMAN - MGMT_PAF_MSG_QTABLE_2 - 0
SYSMAN - MGMT_TASK_QTABLE - 27
SYSTEM - DEF$_AQCALL - 0
SYSTEM - DEF$_AQERROR - 0
WMSYS - WM$EVENT_QUEUE_TABLE - 0

================
Time Zone version
================


11

================
Local Listener
================




================
Default and Temporary Tablespaces By User
================


USERNAME TEMPORARY_TABLESPACE DEFAULT_TABLESPACE
---------------------------- ---------------------- ----------------------
SYS TEMP SYSTEM
SYSTEM TEMP SYSTEM
OUTLN TEMP SYSTEM
MGMT_VIEW TEMP SYSTEM
FLOWS_FILES TEMP SYSAUX
MDSYS TEMP SYSAUX
ORDSYS TEMP SYSAUX
EXFSYS TEMP SYSAUX
DBSNMP TEMP SYSAUX
WMSYS TEMP SYSAUX
APPQOSSYS TEMP SYSAUX
APEX_030200 TEMP SYSAUX
OWBSYS_AUDIT TEMP SYSAUX
ORDDATA TEMP SYSAUX
CTXSYS TEMP SYSAUX
ANONYMOUS TEMP SYSAUX
SYSMAN TEMP SYSAUX
XDB TEMP SYSAUX
ORDPLUGINS TEMP SYSAUX
OWBSYS TEMP SYSAUX
SI_INFORMTN_SCHEMA TEMP SYSAUX
OLAPSYS TEMP SYSAUX
SCOTT TEMP USERS
ORACLE_OCM TEMP USERS
XS$NULL TEMP USERS
MDDATA TEMP USERS
DIP TEMP USERS
APEX_PUBLIC_USER TEMP USERS
SPATIAL_CSW_ADMIN_USR TEMP USERS
SPATIAL_WFS_ADMIN_USR TEMP USERS


================
Component Status
================

Comp ID Component Status Version Org_Version Prv_Version
------- ---------------------------------- --------- -------------- -------------- --------------
AMD OLAP Catalog VALID 11.2.0.1.0
APEX Oracle Application Express VALID 3.2.1.00.10
APS OLAP Analytic Workspace VALID 11.2.0.1.0
CATALOG Oracle Database Catalog Views VALID 11.2.0.1.0
CATJAVA Oracle Database Java Packages VALID 11.2.0.1.0
CATPROC Oracle Database Packages and Types VALID 11.2.0.1.0
CONTEXT Oracle Text VALID 11.2.0.1.0
EM Oracle Enterprise Manager VALID 11.2.0.1.0
EXF Oracle Expression Filter VALID 11.2.0.1.0
JAVAVM JServer JAVA Virtual Machine VALID 11.2.0.1.0
ORDIM Oracle Multimedia VALID 11.2.0.1.0
OWB OWB VALID 11.2.0.1.0
OWM Oracle Workspace Manager VALID 11.2.0.1.0
RUL Oracle Rules Manager VALID 11.2.0.1.0
SDO Spatial VALID 11.2.0.1.0
XDB Oracle XML Database VALID 11.2.0.1.0
XML Oracle XDK VALID 11.2.0.1.0
XOQ Oracle OLAP API VALID 11.2.0.1.0



======================================================
List of Invalid Database Objects Owned by SYS / SYSTEM
======================================================


Number of Invalid Objects
------------------------------------------------------------------
There are no Invalid Objects

DOC>################################################################
DOC>
DOC> If there are no Invalid objects below will result in zero rows.
DOC>
DOC>################################################################
DOC>#


no rows selected


================================
List of Invalid Database Objects
================================


Number of Invalid Objects
------------------------------------------------------------------
There are no Invalid Objects

DOC>################################################################
DOC>
DOC> If there are no Invalid objects below will result in zero rows.
DOC>
DOC>################################################################
DOC>#


no rows selected


======================================================
Count of Invalids by Schema
======================================================

==============================================================
Identifying whether a database was created as 32-bit or 64-bit
==============================================================

DOC>###########################################################################
DOC>
DOC> Result referencing the string 'B023' ==> Database was created as 32-bit
DOC> Result referencing the string 'B047' ==> Database was created as 64-bit
DOC> When String results in 'B023' and when upgrading database to 10.2.0.3.0
DOC> (64-bit) , For known issue refer below articles
DOC>
DOC> Note 412271.1 ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While
DOC> Upgrading Or Patching Databases To 10.2.0.3
DOC> Note 579523.1 ORA-600 [22635], ORA-600 [KOKEIIX1], ORA-7445 [KOPESIZ] and
DOC> OCI-21500 [KOXSIHREAD1] Reported While Upgrading To 11.1.0.6
DOC>
DOC>###########################################################################
DOC>#


Metadata Initial DB Creation Info
-------- -----------------------------------
B047 Database was created as 64-bit

===================================================
Number of Duplicate Objects Owned by SYS and SYSTEM
===================================================

Counting duplicate objects ....


COUNT(1)
----------
0

=========================================
Duplicate Objects Owned by SYS and SYSTEM
=========================================

Querying duplicate objects ....


DOC>
DOC>################################################################################
DOC>Below are expected and required duplicates objects and OMITTED in the report .
DOC>
DOC>Without replication installed:
DOC>INDEX AQ$_SCHEDULES_PRIMARY
DOC>TABLE AQ$_SCHEDULES
DOC>
DOC>If replication is installed by running catrep.sql:
DOC>INDEX AQ$_SCHEDULES_PRIMARY
DOC>PACKAGE DBMS_REPCAT_AUTH
DOC>PACKAGE BODY DBMS_REPCAT_AUTH
DOC>TABLE AQ$_SCHEDULES
DOC>
DOC>If any objects found please follow below article.
DOC>Note 1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM schema
DOC>Read the Exceptions carefully before taking actions.
DOC>
DOC>################################################################################
DOC>#

========================
Password protected roles
========================

DOC>
DOC>################################################################################
DOC>
DOC> In version 11.2 password protected roles are no longer enabled by default so if
DOC> an application relies on such roles being enabled by default and no action is
DOC> performed to allow the user to enter the password with the set role command, it
DOC> is recommended to remove the password from those roles (to allow for existing
DOC> privileges to remain available). For more information see:
DOC>
DOC> Note 745407.1 : What Roles Can Be Set as Default for a User?
DOC>
DOC>################################################################################
DOC>#

Querying for password protected roles ....


Password protected Role Assigned by default to user
------------------------------ ------------------------------
OWB$CLIENT OWBSYS
SPATIAL_CSW_ADMIN SPATIAL_CSW_ADMIN_USR

================
JVM Verification
================


================================================
Checking Existence of Java-Based Users and Roles
================================================

DOC>
DOC>################################################################################
DOC>
DOC> There should not be any Java Based users for database version 9.0.1 and above.
DOC> If any users found, it is faulty JVM.
DOC>
DOC>################################################################################
DOC>#


User Existence
---------------------------
No Java Based Users

DOC>
DOC>###############################################################
DOC>
DOC> Healthy JVM Should contain Six Roles. For 12.2 Seven Roles
DOC> If there are more or less than six role, JVM is inconsistent.
DOC>
DOC>###############################################################
DOC>#


Role
------------------------------
There are 6 JAVA related roles

Roles


ROLE
------------------------------
JAVA_DEPLOY
JAVAUSERPRIV
JAVAIDPRIV
JAVASYSPRIV
JAVADEBUGPRIV
JAVA_ADMIN

=========================================
List of Invalid Java Objects owned by SYS
=========================================

There are no SYS owned invalid JAVA objects

DOC>
DOC>#################################################################
DOC>
DOC> Check the status of the main JVM interface packages DBMS_JAVA
DOC> and INITJVMAUX and make sure it is VALID.
DOC>
DOC> If there are no Invalid objects below will result in zero rows.
DOC>
DOC>#################################################################
DOC>#


no rows selected


DOC>
DOC>#################################################################
DOC>
DOC> If the JAVAVM component is not installed in the database (for
DOC> example, after creating the database with custom scripts), the
DOC> next query will report the following error:
DOC>
DOC> select dbms_java.longname('foo') "JAVAVM TESTING" from dual
DOC> *
DOC> ERROR at line 1:
DOC> ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
DOC>
DOC> If the JAVAVM component is installed, the query should succeed
DOC> with 'foo' as result.
DOC>
DOC>#################################################################
DOC>#


JAVAVM TESTING
---------------
foo

===================================
Oracle Multimedia/InterMedia status
===================================

.
Oracle Multimedia/interMedia is installed and listed with the following version: 11.2.0.1.0 and status: VALID
.
Checking for installed Database Schemas...
ORDSYS user exists.
ORDPLUGINS user exists.
MDSYS user exists.
SI_INFORMTN_SCHEMA user exists.
ORDDATA user exists.
.
Checking for Prerequisite Components...
JAVAVM installed and listed as valid
XDK installed and listed as valid
XDB installed and listed as valid
Validating Oracle Multimedia/interMedia...(no output if component status is valid)

PL/SQL procedure successfully completed.


*** End of LogFile ***



Upload db_upg_diag_orcl_25_Sep_2022_0359.log from "/home/oracle" directory
4.3、备份
禁用所有批处理以及自动crontab作业,对数据库做完整备份.
4.4、相关配置
4.4.1、.bash.profile
> shutdown immediate
按如下内容对/home/oracle/.bash_profile进行修改.
#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1
$ source .bash_profile
4.4.2、dbs&admin
拷贝$ORACLE_HOME/dbs至/u01/app/oracle/product/11.2.0.3/db_1/dbs/
拷贝$ORACLE_HOME/network/admin至/u01/app/oracle/product/11.2.0.3/db_1/network/admin
$ cd /u01/app/oracle/product/11.2.0.3/db_1/
$ cp /u01/app/oracle/product/11.2.0/db_1/dbs/* .
$ ll
total 9544
-rw-r----- 1 oracle oinstall 1544 Sep 25 16:05 hc_DBUA0.dat
-rw-r----- 1 oracle oinstall 1544 Sep 25 16:05 hc_orcl.dat
-rw-r--r-- 1 oracle oinstall 2851 Sep 25 16:05 init.ora
-rw-r----- 1 oracle oinstall 24 Sep 25 16:05 lkORCL
-rw-r----- 1 oracle oinstall 1536 Sep 25 16:05 orapworcl
-rw-r----- 1 oracle oinstall 9748480 Sep 25 16:05 snapcf_orcl.f
-rw-r----- 1 oracle oinstall 2560 Sep 25 16:05 spfileorcl.ora
$ pwd
/u01/app/oracle/product/11.2.0.3/db_1/network/admin
$ cp -rf /u01/app/oracle/product/11.2.0/db_1/network/admin/* .
$ ll
total 20
-rw-r--r-- 1 oracle oinstall 313 Sep 25 16:07 listener.ora
drwxr-xr-x 2 oracle oinstall 4096 Sep 25 15:20 samples
-rw-r--r-- 1 oracle oinstall 187 Sep 25 16:07 shrept.lst
-rw-r--r-- 1 oracle oinstall 210 Sep 25 15:21 sqlnet.ora
-rw-r----- 1 oracle oinstall 321 Sep 25 16:07 tnsnames.ora
4.4.3、oratab
修改/etc/oratab,将11.2.0修改为11.2.0.3
orcl:/u01/app/oracle/product/11.2.0.3/db_1:N
4.5、开始升级
$ sqlplus / as sysdba
> spool /home/oracle/upgrade.log
> startup upgrade
> set echo on
> @$ORACLE_HOME/rdbms/admin/catupgrd.sql (时间:17:20—17:32)
SQL> Rem
SQL> Rem $Header: rdbms/admin/catupgrd.sql /st_rdbms_11.2.0/3 2011/05/18 15:07:25 cmlim Exp $
SQL> Rem
SQL> Rem catupgrd.sql
SQL> Rem
SQL> Rem Copyright (c) 1999, 2011, Oracle and/or its affiliates.
SQL> Rem All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem catupgrd.sql - CATalog UPGraDe to the new release
SQL> Rem
SQL> Rem DESCRIPTION
……
SQL> REM END OF CATUPGRD.SQL
SQL>
SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.
SQL> REM This forces user to start a new sqlplus session in order
SQL> REM to connect to the upgraded db.
SQL> exit
说明:此处upgrade.log文件大小66M,因篇幅过大,省略若干.
执行完catupgrd.sql脚本后,升级结束.
4.6、版本验证
SQL> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlu112s.sql
.
Oracle Database 11.2 Post-Upgrade Status Tool 09-25-2022 16:29:52
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.3.0 00:04:42
JServer JAVA Virtual Machine
. VALID 11.2.0.3.0 00:00:57
Oracle Workspace Manager
. VALID 11.2.0.3.0 00:00:14
OLAP Analytic Workspace
. VALID 11.2.0.3.0 00:00:12
OLAP Catalog
. VALID 11.2.0.3.0 00:00:27
Oracle OLAP API
. VALID 11.2.0.3.0 00:00:08
Oracle Enterprise Manager
. VALID 11.2.0.3.0 00:01:04
Oracle XDK
. VALID 11.2.0.3.0 00:00:16
Oracle Text
. VALID 11.2.0.3.0 00:00:12
Oracle XML Database
. VALID 11.2.0.3.0 00:01:08
Oracle Database Java Packages
. VALID 11.2.0.3.0 00:00:06
Oracle Multimedia
. VALID 11.2.0.3.0 00:01:25
Spatial
. VALID 11.2.0.3.0 00:00:40
Oracle Expression Filter
. VALID 11.2.0.3.0 00:00:03
Oracle Rules Manager
. VALID 11.2.0.3.0 00:00:02
Oracle Application Express
. VALID 3.2.1.00.10
Gathering Statistics
. 00:00:40
Total Upgrade Time: 00:12:23

PL/SQL procedure successfully completed.
> set linesize 150
> set pagesize 9999
> col comp_name format a40
> select comp_name,version,status from dba_registry;

COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ --------------------------------------------
OWB 11.2.0.1.0 VALID
Oracle Application Express 3.2.1.00.10 VALID
Oracle Enterprise Manager 11.2.0.3.0 VALID
OLAP Catalog 11.2.0.3.0 VALID
Spatial 11.2.0.3.0 VALID
Oracle Multimedia 11.2.0.3.0 VALID
Oracle XML Database 11.2.0.3.0 VALID
Oracle Text 11.2.0.3.0 VALID
Oracle Expression Filter 11.2.0.3.0 VALID
Oracle Rules Manager 11.2.0.3.0 VALID
Oracle Workspace Manager 11.2.0.3.0 VALID
Oracle Database Catalog Views 11.2.0.3.0 VALID
Oracle Database Packages and Types 11.2.0.3.0 VALID
JServer JAVA Virtual Machine 11.2.0.3.0 VALID
Oracle XDK 11.2.0.3.0 VALID
Oracle Database Java Packages 11.2.0.3.0 VALID
OLAP Analytic Workspace 11.2.0.3.0 VALID
Oracle OLAP API 11.2.0.3.0 VALID

18 rows selected.
结论:数据库成功升级至11.2.0.3
参考网址:http://blog.itpub.net/26736162/viewspace-1283912


版权声明

本文仅代表作者观点,不代表博信信息网立场。

热门