怎么升级oracle补丁,oracle版本升级方法

如何升级oracle版本

本文档旨在提供指南和核对清单,用于将之前升级的数据库从Oracle12c降级回以前的版本:11.2.0.3,11.2.0.2,11.1.0.7必须加以说明的是,将数据库实例从当前版本降级到升级前的版本时,数据库不会返回到升级前的完全相同状态。根据所涉及的版本,升级过程会进行不可逆的更改。用户使用降级过程可以打开和访问以前版本的数据库实例。这通常便已足够。可能需要采取其他更正操作(例如卸载/重新安装或重新升级到当前补丁集级别来解决降级后的遗留问题。如果目标是让实例返回与升级前完全相同的状态,则还应使用包括完全恢复到升级前状态在内的其他过程。本文中讨论的过程是基于脚本的降级。本文不介绍使用导出/导入、数据泵或其他方法将数据从一个版本移动到另一个版本。您所降级到的版本的Oracle二进制文件,在开始降级过程之前应该在服务器上可用/已安装。如果您卸载了要降级到的Oracle可执行文件,请重新安装Oracle二进制文件到正确的版本/补丁程序级别以降级。此过程旨在降级已成功升级到12c的数据库,并非用于从失败的升级退回。您只能降级到升级前所用的版本和补丁程序级别。直接升级可以在版本10.2.0.5、11.1.0.7或版本11.2.0.2及更高版本上执行。可以对这些版本中除10.2.0.5之外的版本进行降级。例如,如果通过应用中间补丁程序11.1.0.7从Oracle11.1.0.6升级到Oracle12c(12.1.0),则不能降级到Oracle11.1.0.6。降级只能对直接升级版本执行。例外:虽然可以对10.2.0.5直接升级,但降级不适用于10.2.0.5。这是因为在升级过程中,compatible参数已设置为最低11.0.0。这使得无法降级到10.2.0.5。可以降级的版本为11.1.0.7、11.2.0.2、11.2.0.3或更高版本。如果有任何补丁程序应用到了从升级后的主目录运行的源数据库,则需要先回退,然后才能开始降级过程。卸载和回退补丁程序的步骤记录在所涉及补丁程序的自述文件中。未能卸载和回退补丁程序可能会导致无法降级,包括无法重新验证字典对象。Exadata捆绑补丁程序示例,其过程为:卸载补丁程序示例:$opatchauto/u01/app/oracle/patches/14103267-rollback回退任何在补丁程序应用过程中应用的SQL:示例:SQL@rdbms/admin/catbundle_EXA__ROLLBACK.sql,用于回退SQL更改。解决方案降级前步骤-XMLDB组件在12c中是必需的。在升级到12c期间,将安装XMLDB组件(如果未安装)。从12c降级将删除安装的XDB组件-EnterpriseManager不支持降级。在降级之前,请重新配置OracleEM控件。请参阅OracleDatabaseUpgradeGuide12cRelease1(12.1)E17642-106DowngradingOracleDatabasetoanEarlierRelease6.6.5RestoringOracleEnterpriseManagerafterDowngradingOracleDatabase-升级到12c期间,将删除DatabaseControl资料档案库。降级之后,请重新配置DBControl。Note870877.1HowToSaveOracleEnterpriseManagerDatabaseControlDataBeforeUpgradingTheSingleInstanceDatabaseToOtherRelease?Note876353.1HowToRestoreTheOracleEnterpriseManagerDataToDowngradeTheSingleInstanceDatabaseToPrevious/SourceRelease?-compatible参数不能已经更改到12.1.0。-禁用DataVault(如果已启用)。Note803948.1HowToUninstallOrReinstallDatabaseVaultin11g(UNIX)Note453902.1EnablingandDisablingOracleDatabaseVaultinWINDOWS-如果数据库使用OracleLabelSecurity,则在新OracleDatabase12cOracle主目录中运行OracleLabelSecurity(OLS)预处理降级olspredowngrade.sql脚本(在$ORACLE_HOME/rdbms/admin上提供)。-时区版本应相同。-取消设置并指向12c主目录的ORA_TZFILE(如果已设置)。-如果数据库上有OracleApplicationExpress,则必须将apxrelod.sql文件从OracleDatabase12c$ORACLE_HOME/apex/目录复制到Oracle主目录之外的目录,例如系统上的临时目录以稍后执行。-如果基于固定对象创建了对象,则删除这些对象以避免可能的ORA-00600错误。您可以在降级之后重新创建这些对象。-如果降级集群数据库,则彻底关闭实例并将CLUSTER_DATABASE初始化参数更改为FALSE。降级之后,必须将此参数设置回TRUE。满足以上先决条件之后,可以继续进行降级。数据库的降级步骤1)确保所有数据库组件有效。只能从成功升级的数据库执行降级。要验证数据库组件状态,请执行以下查询以SYS用户身份连接到数据库colcomp_idformata10colcomp_nameformata30colversionformata10colstatusformata8selectsubstr(comp_id,1,15)comp_id,substr(comp_name,1,30)comp_name,substr(version,1,10)version,statusfromdba_registry2)验证没有属于sys/system的无效对象selectowner,count(object_name)"Invalidobjectcount"fromdba_objectswherestatus!='VALID'andownerin('SYS','SYSTEM')groupbyowner;如果计数为零,则可以继续降级。如果有无效对象,则执行utlrp.sql多次,如果对象无法解析为有效状态,则不能继续降级。建立SR或在DBA社区上发帖以寻求帮助。或者,对于1和2,运行以下脚本:Note556610.1ScripttoCollectDBUpgrade/MigrateDiagnosticInformation(dbupgdiag.sql)3)关闭数据库Shutdownimmediate4)对12c数据库做备份5)以降级模式启动数据库Startupdowngrade;6)执行降级脚本SqlSpooldowngrade.logSql@$ORACLE_HOME/rdbms/admin/catdwgrd.sql注:$ORACLE_HOME应指向12c主目录catdwgrd.sql脚本将数据库中的所有组件降级到支持的主版本或补丁集版本(您最初升级时的版本)SqlspooloffSqlshutdownimmediateExitSQLPlusSqlexit;7)如果操作系统为LINUX/UNIX:将以下环境变量更改为要降级到的源数据库:ORACLE_HOMEPATH编辑/etc/oratabor/var/opt/oracle/oratab以更改将数据库映射到源数据库Oracle主目录如果操作系统是Windows,则完成以下步骤:a.停止所有Oracle服务,包括OracleDatabase12c数据库的OracleServiceSIDOracle服务,其中SID是实例名称。例如,如果SID为ORCL,则在命令行提示符中输入以下内容:C:\NETSTOPOracleServiceORCLb.在命令提示符下,通过运行ORADIM命令删除Oracle服务。如果出现提示,则输入此Windows系统上活动标准用户帐户的口令。例如,如果SID为ORCL,则输入以下命令:C:\ORADIM-DELETE-SIDORCLc.在命令提示符下,使用ORADIM命令创建要降级的数据库的Oracle服务。C:\ORADIM-NEW-SIDSID-INTPWDPASSWORD-MAXUSERSUSERS-STARTMODEAUTO-PFILEORACLE_HOME\DATABASE\INITSID.ORA8)还原配置文件将配置文件(口令文件、参数文件等)还原到降级版本的ORACLE_HOME。9)如果这是OracleRAC数据库,则执行以下命令以将数据库修改为单实例模式:SETCLUSTER_DATABASE=FALSE10)从降级版本$ORACLE_HOME/rdbms/admin目录执行catrelod脚本。启动sqlplus,以具有sysdba权限的用户SYS身份连接到数据库实例,然后以升级模式启动数据库::cd$ORACLE_HOME/rdbms/admin:sqlplussqlconnectsysassysdbasqlstartupupgradesqlspoolcatrelod.logsql@?/rdbms/admin/catrelod.sqlsqlspooloffcatrelod.sql脚本在降级的数据库中重新加载各个数据库组件的合适版本。11)运行utlrp.sql脚本:SQL@utlrp.sqlSqlexit;utlrp.sql脚本重新编译先前处于INVALID状态的所有现有PL/SQL模块,例如package、procedure、type等。12)检查已降级数据库的状态:Note556610.1ScripttoCollectDBUpgrade/MigrateDiagnosticInformation(dbupgdiag.sql)此sql脚本是一组查询语句,用于提供用户友好的输出,以在升级前后诊断数据库的状态。脚本将创建名为db_upg_diag__.log的文件。13)降级之后,可能在sys用户下发现无效的QT视图。这是因为视图已从基表中选择了错误的列。您需要重新创建这些视图。请参阅说明:Note1520209.1QT_*BUFERViewsInvalidafterdowngradefrom12C降级后步骤:1)如果您是降级到OracleDatabase11g版本1(11.1.0.7)并且数据库中有OracleApplicationExpress,则转到您将apxrelod.sql脚本复制到的目录(在降级前步骤中)。运行apxrelod.sql脚本以手动重新加载OracleApplicationExpress:SQL@apxrelod.sql运行apxrelod.sql脚本以避免程序包APEX_030200.WWV_FLOW_HELP由于以下错误而成为INVALID状态:PLS-00201:identifier'CTX_DDL'mustbedeclared2)如果数据库中启用了OracleLabelSecurity,则执行以下脚本a.从OracleDatabase12c的Oracle主目录下将olstrig.sql脚本复制到要将数据库降级到的版本的Oracle主目录。b.从降级到的版本的Oracle主目录,运行olstrig.sql以在表上使用OracleLabelSecurity策略重新创建DML触发器:SQL@olstrig.sql3)如果降级集群数据库,则必须运行以下命令以降级OracleClusterwaredatabase配置:$srvctldowngradedatabase-ddb-unique-name-ooraclehome-tto_version其中db-unique-name是数据库名称(而非实例名称),oraclehome是已降级数据库的旧Oracle主目录的位置,to_version是数据库所降级到的数据库版本

成都创新互联公司主营三台网站建设的网络公司,主营网站建设方案,成都app软件开发公司,三台h5重庆小程序开发公司搭建,三台网站营销推广欢迎三台等地区企业咨询

oracle怎么升级10.2.0.5

ORACLE10G 10.2.0.1升级到10.2.0.5 2014-06-06 17:23:17

OS: linux redhat 4 U8 64bit

DB: oracle 10.2.0.1

升级:oracle 10.2.0.5

对当前环境的查询

查看磁盘空间使用情况

[root@dongyang ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 18G 11G 6.2G 64% /

/dev/sda1 988M 42M 896M 5% /boot

tmpfs 1002M 0 1002M 0% /dev/shm

/dev/sdb1 12G 2.3G 9.0G 21% /u01

[root@dongyang ~]#

查看操作系统版本

[root@dongyang ~]# cat /proc/version

Linux version 2.6.32-200.13.1.el5uek (mockbuild@ca-build9.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Wed Jul 27 21:02:33 EDT 2011

[root@dongyang ~]# uname -r

2.6.32-200.13.1.el5uek

[root@dongyang ~]#

查看当前数据库版本

SQL select * from v$version;

select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

PL/SQL Release 10.2.0.1.0 - Production

CORE 10.2.0.1.0 Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

SQL

查看oracle用户环境变量

[oracle@dongyang ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

alias uni="uniread sqlplus"

export PATH

unset USERNAME

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export ORACLE_SID=fengzi

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export NLS_DATA_FORMAT="YYYY-MM-DD HH24:MI:SS"

export NLS_DATA_LANGUAGE="AMERICAN"

export DISPLAY=192.168.56.1:0.0

要先对数据库进行冷备与软件备份

备份数据库软件(磁盘空间足够)

[root@dongyang ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 18G 11G 6.2G 64% /

/dev/sda1 988M 42M 896M 5% /boot

tmpfs 1002M 0 1002M 0% /dev/shm

/dev/sdb1 12G 2.3G 9.0G 21% /u01

[root@dongyang ~]#

[root@dongyang ~]# mkdir /u02

[root@dongyang ~]# cd /u01

[root@dongyang u01]# cp -r * /u02

关闭当前数据库

[oracle@dongyang ~]$ echo $ORACLE_SID

fengzi

[oracle@dongyang ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 5 13:46:04 2014

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL

登录RMAN 启动数据库到mount状态

[oracle@dongyang ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jun 5 13:48:42 2014

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

connected to target database (not started)

RMANstartup mount

database is already started

database mounted

备份当前控制文件

RMAN backup current controlfile;

Starting backup at 05-JUN-14

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=322 devtype=DISK

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

including current control file in backupset

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=+DATA/fengzi/backupset/2014_06_05/ncnnf0_tag20140605t140242_0.380.849448965 tag=TAG20140605T140242 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05

Finished backup at 05-JUN-14

Starting Control File and SPFILE Autobackup at 05-JUN-14

piece handle=+DATA/fengzi/autobackup/2014_06_05/s_849447979.381.849448969 comment=NONE

Finished Control File and SPFILE Autobackup at 05-JUN-14

备份数据库到 /u01/backup/目录下

RMAN backup database format '/u01/backup/2014_06_01_%U';

Starting backup at 05-JUN-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=+DATA/fengzi/datafile/system.277.842187103

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=/u01/backup/2014_06_01_27pa3431_1_1 tag=TAG20140605T140417 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00007 name=/u01/app/oracle/oradata/FENGZI/datafile/o1_mf_wer_9ns1wd2n_.dbf

input datafile fno=00008 name=/u01/app/oracle/oradata/yyyy12.dbf

input datafile fno=00009 name=/u01/app/oracle/oradata/tt.dbf

input datafile fno=00004 name=+DATA/fengzi/datafile/users2.dbf

input datafile fno=00005 name=+DATA/fengzi/datafile/undotbs.dbf

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=/u01/backup/2014_06_01_28pa345d_1_1 tag=TAG20140605T140417 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00003 name=+DATA/fengzi/datafile/sysaux.279.842187235

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=/u01/backup/2014_06_01_29pa3466_1_1 tag=TAG20140605T140417 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00002 name=+DATA/fengzi/datafile/undotbs1.dbf

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=/u01/backup/2014_06_01_2apa347j_1_1 tag=TAG20140605T140417 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:26

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00006 name=+DATA/fengzi/datafile/users1.dbf

channel ORA_DISK_1: starting piece 1 at 05-JUN-14

channel ORA_DISK_1: finished piece 1 at 05-JUN-14

piece handle=/u01/backup/2014_06_01_2bpa348d_1_1 tag=TAG20140605T140417 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07

Finished backup at 05-JUN-14

Starting Control File and SPFILE Autobackup at 05-JUN-14

piece handle=+DATA/fengzi/autobackup/2014_06_05/s_849447979.382.849449239 comment=NONE

Finished Control File and SPFILE Autobackup at 05-JUN-14

RMAN

停止所有oracle服务,太长请自己看http //blog.itpub.net/29532781/viewspace-1177188/

oracle 11.2.0.2.3补丁怎么打

oracle手动升级有两种方式,一种在安装oracle软件之后,安装升级包,然后创建数据库;另一种在oracle数据库创建以后,进行升级。

下面主要介绍oracle数据库创建后进行的数据库升级(10.2.0.1-10.2.0.4),代码如下:

SQL --查看当前数据库版本

SQL select * from v$version;

SQL --给用户scott解锁

SQL alter user scott account unlock;

SQL --查看表空间

SQL select * from dba_tablespaces;

SQL --查看数据文件存放位置

SQL select * from dba_data_files;

SQL --创建测试表空间

SQL create tablespace ts_upgrade datafile '/u02/oradata/data/orcl/ts_upgrade01.dbf' size 5m autoextend on maxsize 30g;

SQL --创建用户

SQL create user u_upgrade identified by "123456" default tablespace ts_upgrade temporary tablespace temp;

SQL --为用户赋权

SQL grant connect,resource to u_upgrade;

SQL --创建测试表

SQL create table u_upgrade.dept as select * from scott.dept;

SQL select * from u_upgrade.dept;

[oracle@feegle ~]$ #停止em

[oracle@feegle ~]$ emctl stop dbconsole

[oracle@feegle ~]$ #停止sql*plus

[oracle@feegle ~]$ isqlplusctl stop

[oracle@feegle ~]$ #停止监听

[oracle@feegle ~]$ lsnrctl stop

[oracle@feegle ~]$ #安装升级包(p6810189_10204_Linux-x86-64.zip)

[oracle@feegle ~]$ #手动升级数据库

[oracle@feegle ~]$ sqlplus /nolog

SQL conn /as sysdba

SQL --以升级模式启动数据库

SQL startup upgrade;

SQL --重建数据字典(建议关闭数据库归档)

SQL spool upgrade.log

SQL @$ORACLE_HOME/rdbms/admin/catupgrd.sql

#####重建数据字典部分截图#####

Oracle Database 10.2 Upgrade Status Utility 06-15-2012 18:27:56

.

Component Status Version HH:MM:SS

Oracle Database Server VALID 10.2.0.4.0 00:12:04

JServer JAVA Virtual Machine VALID 10.2.0.4.0 00:04:58

Oracle XDK VALID 10.2.0.4.0 00:00:32

Oracle Database Java Packages VALID 10.2.0.4.0 00:00:28

Oracle Text VALID 10.2.0.4.0 00:00:25

Oracle XML Database VALID 10.2.0.4.0 00:02:25

Oracle Workspace Manager VALID 10.2.0.4.3 00:00:43

Oracle Data Mining VALID 10.2.0.4.0 00:00:21

OLAP Analytic Workspace VALID 10.2.0.4.0 00:00:23

OLAP Catalog VALID 10.2.0.4.0 00:01:02

Oracle OLAP API VALID 10.2.0.4.0 00:00:53

Oracle interMedia VALID 10.2.0.4.0 00:03:52

Spatial VALID 10.2.0.4.0 00:01:37

Oracle Expression Filter VALID 10.2.0.4.0 00:00:12

Oracle Enterprise Manager VALID 10.2.0.4.0 00:01:18

Oracle Rule Manager VALID 10.2.0.4.0 00:00:10

.

Total Upgrade Time: 00:31:30

DOC#######################################################################

DOC#######################################################################

DOC

DOC The above PL/SQL lists the SERVER components in the upgraded

DOC database, along with their current version and status.

DOC

DOC Please review the status and version columns and look for

DOC any errors in the spool log file. If there are errors in the spool

DOC file, or any components are not VALID or not the current version,

DOC consult the Oracle Database Upgrade Guide for troubleshooting

DOC recommendations.

DOC

DOC Next shutdown immediate, restart for normal operation, and then

DOC run utlrp.sql to recompile any invalid application objects.

DOC

DOC#######################################################################

DOC#######################################################################

DOC#

SQL

#####重建数据字典部分截图#####

SQL spool off

SQL --关闭数据库

SQL shutdown immediate;

SQL --启动数据库

SQL startup;

SQL --编译无效对象

SQL @$ORACLE_HOME/rdbms/admin/utlrp.sql

#####编译无效对象部分截图#####

DOC 1. Query showing jobs created by UTL_RECOMP

DOC SELECT job_name FROM dba_scheduler_jobs

DOC WHERE job_name like 'UTL_RECOMP_SLAVE_%';

DOC

DOC 2. Query showing UTL_RECOMP jobs that are running

DOC SELECT job_name FROM dba_scheduler_running_jobs

DOC WHERE job_name like 'UTL_RECOMP_SLAVE_%';

DOC#

TIMESTAMP

--------------------------------------------------------------------------------

COMP_TIMESTAMP UTLRP_END 2012-06-15 18:45:01

DOC The following query reports the number of objects that have compiled

DOC with errors (objects that compile with errors have status set to 3 in

DOC obj$). If the number is higher than expected, please examine the error

DOC messages reported with each object (using SHOW ERRORS) to see if they

DOC point to system misconfiguration or resource constraints that must be

DOC fixed before attempting to recompile these objects.

DOC#

OBJECTS WITH ERRORS

-------------------

DOC The following query reports the number of errors caught during

DOC recompilation. If this number is non-zero, please query the error

DOC messages in the table UTL_RECOMP_ERRORS to see if any of these errors

DOC are due to misconfiguration or resource constraints that must be

DOC fixed before objects can compile successfully.

DOC#

ERRORS DURING RECOMPILATION

---------------------------

SQL

#####编译无效对象部分截图#####

SQL 验证升级

SQL --查看组件状态

SQL --status=VALID

SQL select comp_name, version, status from sys.dba_registry;

SQL --查看表空间状态

SQL select tablespace_name,status from dba_tablespaces;

SQL --查看用户

SQL select username from dba_users;

SQL --查看用户对象

SQL select object_name from dba_objects where owner='SCOTT';

SQL select object_name from dba_objects where owner='U_UPGRADE';

SQL select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

PL/SQL Release 10.2.0.4.0 - Production

CORE 10.2.0.4.0 Production

TNS for Linux: Version 10.2.0.4.0 - Production

NLSRTL Version 10.2.0.4.0 - Production

[oracle@feegle ~]$ #启动监听

[oracle@feegle ~]$ lsnrctl start

[oracle@feegle ~]$ #启动EM

[oracle@feegle ~]$ emctl start dbconsole

[oracle@feegle ~]$ #启动SQL*PLUS

[oracle@feegle ~]$ isqlplusctl start

如何升级Oracle Grid Infrastructure和RAC从11.2.0.3到11.2.0.4

把GI 和 RAC从 11.2.0.3升级到11.2.0.4的主要步骤:

1. 升级GI

1) 下载11.2.0.4 GI软件:

11.2.0.4的下载链接:

p13390677_112040_platform_3of7.zip是 Oracle Grid Infrastructure (includes Oracle ASM, Oracle Clusterware, and Oracle Restart)。

2) 安装11.2.0.4 GI到一个新的ORACLE_HOME(不要停止旧的GI,所有节点GI都启动)。

3) 安装的时候选择“Upgrade Oracle Grid Infrastructure or Oracle Automatic Storage Management”。

4) 安装结束时,根据提示用root用户在各个节点依次执行rootupgrade.sh 。

5) 修改grid用户的环境变量ORACLE_HOME 和 PATH 等到新的路径

6) 参考 11.2 GI 升级的官方文档:

Oracle® Grid Infrastructure Installation Guide

11g Release 2 (11.2) for Linux

E41961-02

F How to Upgrade to Oracle Grid Infrastructure 11g Release 2

2. 升级RAC数据库软件

1) 下载 11.2.0.4数据库软件:

p13390677_112040_platform_1of7.zip

p13390677_112040_platform_2of7.zip

上面的两个补丁包是Oracle Database (includes Oracle Database and Oracle RAC)。

2) 在安装前一定要取消oracle用户的ORACLE_BASE, ORACLE_HOME, ORACLE_SID等的设置。

3) 安装 11.2.0.4 RAC 到一个新的ORACLE_HOME,选择只安装软件不建库(Install database software only)

4) 在安装11.2.0.4的过程中设置正确的ORACLE_BASE and ORACLE_HOME.

5) 安装的要求请参考11.2官方文档:

Oracle® Real Application Clusters Installation Guide

11g Release 2 (11.2) for Linux and UNIX

E41962-03

3. 升级已有的数据库

1) 升级前一定要备份数据库。

2) 运行utlu112i.sql 来进行升级前的检查(数据库是启动的):

su - oracle

export ORACLE_HOME=旧的ORACLE_HOME

export ORACLE_SID=实例名

$ORACLE_HOME/bin/sqlplus / as sysdba

SQL @/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlu112i.sql ==这是新的ORACLE_HOME下面的脚本,修正这个脚本所发现的所有问题。

3) 运行11.2.0.4的DBUA来升级数据库:

新的ORACLE_HOME/bin/dbua

DBUA 将会执行的工作:

-DBUA会从/etc/oratab获得数据库的信息

- 停止数据库和DBConsole

- 在新的ORACLE_HOME创建密码文件

- 拷贝spfile到新的ORACLE_HOME 并且去除obsolete的参数

- 在DBUA中可以选择备份数据库

- 在DBUA中可以把数据文件从file system/raw devices 迁移到ASM (需要保证diskgroup是mount的)

4) 修改oracle用户的环境变量ORACLE_HOME 和 PATH 等到新的路径

5) 请参考 数据库升级到11.2的官方文档


网站标题:怎么升级oracle补丁,oracle版本升级方法
当前路径:http://ybzwz.com/article/dscossg.html