探索Oracle之数据库升级九 12.1.0.1 Update 12.1.0.2

探索Oracle之数据库升级九

12.1.0.1 Update 12.1.0.2

一、检查当前数据库版本及系统信息

[[email protected] ~]$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Release: 5.8
Codename: Tikanga
[[email protected] ~]$ uname -a
Linux db01 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Li

[[email protected] DBData]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       53G 26G 24G 52% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 4.0G 1.1G 3.0G 26% /dev/shm

SQL> select * from v$version;

BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
PL/SQL Release 12.1.0.1.0 - Production 0
CORE 12.1.0.1.0 Production 0
TNS for Linux: Version 12.1.0.1.0 - Production 0
NLSRTL Version 12.1.0.1.0 - Production 0

SQL> col comp_name format a40
SQL> col version format a13
SQL> col control format a8
SQL> col status format a15
SQL> set line 300
SQL> set pagesize 800
SQL> select comp_name,version,control,status from dba_server_registry;

COMP_NAME VERSION CONTROL STATUS
---------------------------------------- ------------- -------- ---------------
Oracle Database Vault 12.1.0.1.0 SYS VALID
Oracle Application Express 4.2.0.00.27 SYS VALID
Oracle Label Security 12.1.0.1.0 SYS VALID
Spatial 12.1.0.1.0 SYS VALID
Oracle Multimedia 12.1.0.1.0 SYS VALID
Oracle Text 12.1.0.1.0 SYS VALID
Oracle Workspace Manager 12.1.0.1.0 SYS VALID
Oracle XML Database 12.1.0.1.0 SYS VALID
Oracle Database Catalog Views 12.1.0.1.0 SYS VALID
Oracle Database Packages and Types 12.1.0.1.0 SYS VALID
JServer JAVA Virtual Machine 12.1.0.1.0 SYS VALID
Oracle XDK 12.1.0.1.0 SYS VALID
Oracle Database Java Packages 12.1.0.1.0 SYS VALID
OLAP Analytic Workspace 12.1.0.1.0 SYS VALID
Oracle OLAP API 12.1.0.1.0 SYS VALID
Oracle Real Application Clusters 12.1.0.1.0 SYS OPTION OFF

16 rows selected.

二、删除EM

[[email protected] ~]$ emctl stop dbconsole
SQL> @$ORACLE_HOME/rdbms/admin/emremove.sql
old 69: IF (upper('&LOGGING') = 'VERBOSE')
new 69: IF (upper('VERBOSE') = 'VERBOSE')

PL/SQL procedure successfully completed.
[[email protected] ~]$ rm –rf $ORACLE_HOME/$HOSTNAME
[[email protected] ~]$ rm –rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_*

三、备份数据库

RMAN> backup database plus archivelog delete input format '/DBBackup/Phycal/full_%U.bak';
Starting backup at 02-DEC-14
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=48 RECID=1 STAMP=865232107
input archived log thread=1 sequence=49 RECID=2 STAMP=865232108
input archived log thread=1 sequence=50 RECID=3 STAMP=865232110
input archived log thread=1 sequence=51 RECID=4 STAMP=865232124
input archived log thread=1 sequence=52 RECID=5 STAMP=865232126
input archived log thread=1 sequence=53 RECID=6 STAMP=865232129
input archived log thread=1 sequence=54 RECID=7 STAMP=865232130
input archived log thread=1 sequence=55 RECID=8 STAMP=865232199
input archived log thread=1 sequence=56 RECID=9 STAMP=865232199
input archived log thread=1 sequence=57 RECID=10 STAMP=865232203
input archived log thread=1 sequence=58 RECID=11 STAMP=865232203
input archived log thread=1 sequence=59 RECID=12 STAMP=865232203
input archived log thread=1 sequence=60 RECID=13 STAMP=865232203
input archived log thread=1 sequence=61 RECID=14 STAMP=865232209
input archived log thread=1 sequence=62 RECID=15 STAMP=865232380
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBBackup/Phycal/full_05pp4pfs_1_1.bak tag=TAG20141202T061940 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_48_b7st3cbs_.arc RECID=1 STAMP=865232107
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_49_b7st3d69_.arc RECID=2 STAMP=865232108
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_50_b7st3fwr_.arc RECID=3 STAMP=865232110
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_51_b7st3wto_.arc RECID=4 STAMP=865232124
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_52_b7st3ydw_.arc RECID=5 STAMP=865232126
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_53_b7st41h9_.arc RECID=6 STAMP=865232129
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_54_b7st428n_.arc RECID=7 STAMP=865232130
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_55_b7st66z1_.arc RECID=8 STAMP=865232199
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_56_b7st67ox_.arc RECID=9 STAMP=865232199
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_57_b7st6c1b_.arc RECID=10 STAMP=865232203
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_58_b7st6c22_.arc RECID=11 STAMP=865232203
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_59_b7st6c6y_.arc RECID=12 STAMP=865232203
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_60_b7st6c7o_.arc RECID=13 STAMP=865232203
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_61_b7st6kq8_.arc RECID=14 STAMP=865232209
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_62_b7stcwmv_.arc RECID=15 STAMP=865232380
Finished backup at 02-DEC-14
Starting backup at 02-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/DBData/WOO12C/datafile/o1_mf_undotbs1_b7gh653v_.dbf
input datafile file number=00001 name=/DBData/WOO12C/datafile/o1_mf_system_b7gh4dtv_.dbf
input datafile file number=00003 name=/DBData/WOO12C/datafile/o1_mf_sysaux_b7gh21p2_.dbf
input datafile file number=00006 name=/DBData/WOO12C/datafile/o1_mf_users_b7gh6409_.dbf
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBData/fast_recovery_area/WOO12C/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stcyyx_.bkp tag=TAG20141202T061942 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:36
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_sysaux_b7gknfyd_.dbf
input datafile file number=00013 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_system_b7gknfmp_.dbf
input datafile file number=00015 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_users_b7gkngh6_.dbf
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBData/fast_recovery_area/WOO12C/0847D2A3397B02B0E0533307A8C077E9/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stgzdo_.bkp tag=TAG20141202T061942 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_sysaux_b7ghrvm2_.dbf
input datafile file number=00008 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_system_b7ghrvnw_.dbf
input datafile file number=00010 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_users_b7ght9rv_.dbf
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBData/fast_recovery_area/WOO12C/08D98EA3271835F9E0533307A8C068EE/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stlll8_.bkp tag=TAG20141202T061942 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/DBData/WOO12C/datafile/o1_mf_sysaux_b7gh7gjq_.dbf
input datafile file number=00005 name=/DBData/WOO12C/datafile/o1_mf_system_b7gh7gkl_.dbf
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBData/fast_recovery_area/WOO12C/08D970F59616336FE0533307A8C03C35/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stn9ly_.bkp tag=TAG20141202T061942 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
Finished backup at 02-DEC-14
Starting backup at 02-DEC-14
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=63 RECID=16 STAMP=865232715
channel ORA_DISK_1: starting piece 1 at 02-DEC-14
channel ORA_DISK_1: finished piece 1 at 02-DEC-14
piece handle=/DBBackup/Phycal/full_0app4pqb_1_1.bak tag=TAG20141202T062515 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_63_b7stpbxz_.arc RECID=16 STAMP=865232715
Finished backup at 02-DEC-14
Starting Control File and SPFILE Autobackup at 02-DEC-14
piece handle=/DBData/fast_recovery_area/WOO12C/autobackup/2014_12_02/o1_mf_s_865232716_b7stpfto_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 02-DEC-14

四、上传解压12.1.0.2安装介质,并解压缩

[[email protected] ~]$ ll p17694377_121020*
-rw-r--r-- 1 oracle oinstall 1673517582 Dec 2 05:38 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r-- 1 oracle oinstall 1014527110 Nov 28 02:44 p17694377_121020_Linux-x86-64_2of8.zip
[[email protected] ~]$ unzip p17694377_121020_Linux-x86-64_1of8.zip
[[email protected] ~]$ unzip p17694377_121020_Linux-x86-64_2of8.zip

五、创建用户安装12.1.0.2的软件目录

[[email protected] ~]$ cd /DBSoft/Product/
[[email protected] Product]$ ls
12.1.0
[[email protected] Product]$ mkdir -p 12.1.0.2/db_1
[[email protected] Product]$ ll
total 8
drwxr-xr-x 3 oracle oinstall 4096 Nov 20 05:39 12.1.0
drwxr-xr-x 3 oracle oinstall 4096 Dec 2 07:57 12.1.0.2

六、开始安装:

七、软件安装完成之后执行root.sh脚本

[[email protected] ~]# /DBSoft/Product/12.1.0.2/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /DBSoft/Product/12.1.0.2/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
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 Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[[email protected] ~]#

八、至此升级安装已经完成。

九、完成之后检查数据库版本:

SQL> set line 300
SQL> set pagesize 1000
SQL> r
  1* select * from v$version

BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 0
PL/SQL Release 12.1.0.2.0 - Production 0
CORE 12.1.0.2.0 Production 0
TNS for Linux: Version 12.1.0.2.0 - Production 0
NLSRTL Version 12.1.0.2.0 - Production 0

十、检查各组件版本:

SQL> select comp_name,version,control,status from dba_server_registry;

COMP_NAME VERSION CONTROL STATUS
---------------------------------------- ------------- -------- ---------------
Oracle Database Vault 12.1.0.2.0 SYS VALID
Oracle Application Express 4.2.5.00.08 SYS VALID
Oracle Label Security 12.1.0.2.0 SYS VALID
Spatial 12.1.0.2.0 SYS VALID
Oracle Multimedia 12.1.0.2.0 SYS VALID
Oracle Text 12.1.0.2.0 SYS VALID
Oracle Workspace Manager 12.1.0.2.0 SYS VALID
Oracle XML Database 12.1.0.2.0 SYS VALID
Oracle Database Catalog Views 12.1.0.2.0 SYS VALID
Oracle Database Packages and Types 12.1.0.2.0 SYS VALID
JServer JAVA Virtual Machine 12.1.0.2.0 SYS VALID
Oracle XDK 12.1.0.2.0 SYS VALID
Oracle Database Java Packages 12.1.0.2.0 SYS VALID
OLAP Analytic Workspace 12.1.0.2.0 SYS VALID
Oracle OLAP API 12.1.0.2.0 SYS VALID
Oracle Real Application Clusters 12.1.0.2.0 SYS OPTION OFF

16 rows selected.

十一、检查数据库失效对象,是没有失效的对象,如果有的话执行utlrcmp.sql重新编译

SQL> select owner, object_name, object_type, status from dba_objects where status=\'INVALID\' order by 1, 2,3;

no rows selected

SQL>

十一、open 所有PDBs,并查看PDBs状态

SQL> show pdbs 

    CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED READ ONLY NO
         3 PDB01 MOUNTED
         4 WOO_ORA11G MOUNTED
SQL> alter pluggable database all open;

Pluggable database altered.

SQL> show pdbs;

    CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED READ ONLY NO
         3 PDB01 READ WRITE NO
         4 WOO_ORA11G READ WRITE NO

时间: 2024-11-07 18:56:31

探索Oracle之数据库升级九 12.1.0.1 Update 12.1.0.2的相关文章

探索Oracle之数据库升级十 12c(12.1.0.2)CPU 19774304

探索Oracle之数据库升级十 12c(12.1.0.2)CPU 19774304 一.   补丁描述 参考metalink doc: (Doc ID 19774304.8) Bug19774304 - 12.1.0.2 Bundle Patch 2 for Engineered Systems and DB In-Memory (Nov2014) (Doc ID 19774304.8) 二.   补丁包含 19649591 DATABASE BUNDLE PATCH 12.1.0.2.2 (O

探索Oracle之数据库升级六 11.2.0.4.3 Upgrade12c(12.2.0.1)

探索Oracle之数据库升级六 11.2.0.4.3 Upgrade12c(12.2.0.1) 一.前言:        Oracle 12c发布距今已经一年有余了,其最大亮点是一个可以插拔的数据库(PDB),这是在之前版本没有的:但是如果我们要将以前版本的数据库升级到12c来,那么也应顺其自然的将其变成一个pdb,那么我们的工作不仅包含了数据库软件的升级,同时也包含如何将一个NO-CDB的数据库plug to CDB none. 二.升级要求: 三.升级前准备:        3.1.查看数据

探索Oracle之数据库升级四 11.2.0.4.0 PSU 11.2.0.4.3

探索Oracle之数据库升级四 11.2.0.4.0 PSU 11.2.0.4.3   一.  检查当前数据库PSU号: [[email protected] ~]$ cd/DBSoft/Product/11.2.4/db_1/OPatch/ [[email protected] OPatch]$ ls crs docs emdpatch.pl jlib ocm opatch opatch.bat opatchdiag opatchdiag.bat opatch.ini opatch.pl op

探索Oracle之数据库升级二 11.2.0.3升级到11.2.0.4完整步骤

探索Oracle之数据库升级二  11.2.0.3升级到11.2.0.4完整步骤 说明:         这篇文章主要是记录下单实例环境下Oracle 11.2.0.1升级到11.2.0.3的过程,当然RAC的升级是会有所不同.但是他们每个版本之间升级步骤都是差不多的,先升级Database Software,再升级Oracle Instance. Oracle 11.2.0.4的Patchset No:19852360下载需要有Oracle Support才可以.  Patchset包含有7个

探索Oracle之数据库升级七 11gR2 to 12c 升级完成后插入PDB

探索Oracle之数据库升级七 11gR2 to 12c 升级完成后插入PDB 前言:        从Oracle 12c开始,引入了容器数据库的概念,可以实现数据库插拔操作,如下图: 现在我们就来看看如何将11.2.0.4的数据库插入到12c的CDP里面去,让其成为一个PDB 数据库. 一.查看数据库信息: SQL> col BANNER format a80 SQL> set line 300 SQL> select * from v$version; BANNER CON_ID

探索Oracle之数据库升级八 12c Downgrade 11gR2

探索Oracle之数据库升级八 12c Downgrade 11gR2 前言: 我们前面已经完成了11gR2 upgrade to 12c 的升级,整个过程还是比较顺利的,虽然和以前版本升级有些不太一样,但是整个难度不是太大,但是由于太多的特性不同,大大的加长了升级的时间. 但是对于Oracle 12c降回到之前版本,会有些限制,只能降级到升级前所用的版本和补丁级别. 如果我们是直接从10.2.0.5.11.1.0.7或版本11.2.0.2及更高版进行升级.那么将无法降级到10.2.0.5. 如

探索Oracle之数据库升级五 PSU11.2.0.4.3 rollback 11.2.0.4.0

探索Oracle之数据库升级五 PSU11.2.0.4.3 rollback 11.2.0.4.0 一.进入PSU目录,执行opatch rollback [[email protected]~]# su - oracle [[email protected]~]$ ls c18522509 Desktop OPatch p18522509_112040_Linux-x86-64.zip p6880880_112000_Linux-x86-64.zip PatchSearch.xml upgra

12.1.0.2.0 DB PSU 12.1.0.2.180116

[[email protected] software]# /oracle/app/oracle/product/12.1.0/db_1/OPatch/opatchauto apply  /oracle/software/27010872  -oh /oracle/app/oracle/product/12.1.0/db_1 -analyze OPatchauto session is initiated at Thu Apr  5 10:14:58 2018 System initializa

[独孤九剑]Oracle知识点梳理(九)数据库常用对象之常见package

本系列链接导航: [独孤九剑]Oracle知识点梳理(一)表空间.用户 [独孤九剑]Oracle知识点梳理(二)数据库的连接 [独孤九剑]Oracle知识点梳理(三)导入.导出 [独孤九剑]Oracle知识点梳理(四)SQL语句之DML和DDL [独孤九剑]Oracle知识点梳理(五)数据库常用对象之Table.View [独孤九剑]Oracle知识点梳理(六)数据库常用对象之Procedure.function.Sequence [独孤九剑]Oracle知识点梳理(七)数据库常用对象之Curs