ry Manager: Release 11.2.0.1.0 - Production on Wed Jun 24 11:38:23 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> run {
2> startup mount;
3> backup database format '/dsk1/backup/%d_%s.bak';
4> backup current controlfile format '/dsk1/backup/control.bak';
5> }
Oracle instance started
database mounted
Total System Global Area 417546240 bytes
Fixed Size 2213936 bytes
Variable Size 297797584 bytes
Database Buffers 113246208 bytes
Redo Buffers 4288512 bytes
Starting backup at 24-JUN-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/prod/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/prod/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/prod/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/prod/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUN-15
......
RMAN> list backup of database;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 1.00G DISK 00:00:58 24-JUN-15
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20150624T113940
Piece Name: /dsk1/backup/PROD_1.bak
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1066745 24-JUN-15 /u01/app/oracle/oradata/prod/system01.dbf
2 Full 1066745 24-JUN-15 /u01/app/oracle/oradata/prod/sysaux01.dbf
3 Full 1066745 24-JUN-15 /u01/app/oracle/oradata/prod/undotbs01.dbf
4 Full 1066745 24-JUN-15 /u01/app/oracle/oradata/prod/users01.dbf
5 Full 1066745 24-JUN-15 /u01/app/oracle/oradata/prod/example01.dbf
关闭数据库准备升级:
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
本次采用Out-of-Place Upgrade,所以将11.2.0.3的软件安装到不同的目录下:
[oracle@rh6 ~]$ mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
[oracle@rh6 ~]$ cat .bash_profile
export EDITOR=vi
export ORACLE_SID=prod
export ORACLE_BASE=/u01/app/oracle
#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
运行Patchset 的runInstaller:

注意这里,我们选择第三个选项,skip software update,因为我们的patchset已经下载过了

安装11.2.0.3.0软件



执行root.sh脚本(以root身份):
[root@rh6 ~]# /u01/app/oracle/product/11.2.0.3/db_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.3/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" hav