Oracle数据库升级技术方案
ORACLE数据库跨平台升级方案和实施

ORACLE数据库跨平台升级方案研究和实施12李灿召 孙玉晶(1.中国移动通信集团 吉林有限公司 业务支撑中心 吉林 长春 130021;2.中国移动通信集团 吉林有限公司 长春分公司 吉林 长春 130000)摘 要: 随着关系型数据库的不断发展和新技术的引入,数据库作为各行业的数据核心和业务枢纽,数据量呈几何倍数膨胀,超TB级数据库不再鲜见。
数据量的膨胀导致后续的版本升级和系统迁移更难操作,结合实际操作经验,从时间、风险和应急策略等方面入手,详细阐述大数据量数据库跨平台升级方案的研究、选择和实施,在实际的操作过程中取得良好的效果,具有一定的参考价值。
关键词: ORACLE;数据库;升级;数据迁移中图分类号:TP311 文献标识码:A 文章编号:1671-7597(2012)1110109-012010年基于系统发展实际需要,决定对业务支撑系统数据 2 方案介绍库进行升级,核心CRM和BOSS核心数据库由9i升到10G,服务器“不停机”的跨平台数据库升级和数据迁移方案,通过中更换为IBM平台,存储更换为EMC,CRM和BOSS数据库作为业务支间数据库实现基础数据同步和迁移,规避了前期数据同步期间撑系统的数据中心和业务枢纽,其升级方案的选择尤为重要。
对正常生产的影响,中间数据库利用原系统BC备份搭建,服务CRM和BOSS数据库容量均超过10TB,实际数据量都在5TB左右,器和原系统的主机、数据库保持一致,配置比原系统低很多。
项目要求在完成新、旧系统切换的同时进行垃圾数据清理、分该方案采用数据分级模式组织实施,通过中间数据库实现历史布规划和权限优化。
数据(静态数据)和基础数据的准备,前期准备工作完成后通1 方案选择过SharePlex软件保持活跃数据的准实时同步,正式割接时待1.1 影响因素数据同步完成后即可实施割接,割接同时启用反向同步机制,确保升级失败回切时原库数据的准确性。
业务连续性挑战:业务支撑系统是24x7全天候运行的系统,宕机不仅意味着大量的收入损失,同时严重影响公司的服务形象。
数据库升级9i to 10g

数据库升级9i TO 10gR2目录一、升级步骤 (3)二、Oracle9i组件版本升级 (3)2.1、创建10gR2数据库HOME目录 (3)三、Oracle10.2.0.1软件安装 (7)3.1 Oraap2用户环境变量设置 (7)3.2安装Oracle10.2.0.1软件 (7)四、升级数据库9i到10.2.0.1 (10)4.1 检查oratab条目 (10)4.2 启动database upgrade assistant(DBUA) (10)五、安装Oracle10.2.0.5 patch (19)5.1 关闭数据库和监听 (19)5.2 安装Oracle10.2.0.5 patch (19)5.3升级数据库字典到10.2.0.5 (22)一、升级步骤1、当前Oracle软件版本为9.2.0.7,但是组件版本是9.2.0.1,先升级组件版本到9.2.0.72、组件升级后,安装Oracle10.2.0.1软件3、升级数据库版本9.2.0.7到10.2.0.14、版本升级完成后,测试组件版本是否升级成功,数据是否完整5、关闭10.2.0.1数据库,应用Oracle10.2.0.5path6、启动数据库,编译数据库字典7、编译完成后,打开数据库,测试二、Oracle9i组件版本升级2.1、创建10gR2数据库HOME目录su – oraap2mkdir /oracle/AP2/102_642.2、检查oracle inventory目录2.3 源库(9I)组件版本检查select COMP_NAME,VERSION,STATUS from dba_registry;COMP_NAME--------------------------------------------------------------------------------VERSION STATUS------------------------------ -----------Oracle9i Catalog Views9.2.0.1.0 VALIDOracle9i Packages and Types9.2.0.1.0 VALIDSQL>SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startup migrateORACLE instance started.Total System Global Area 5257289416 bytes Fixed Size 749256 bytes Variable Size 956301312 bytes Database Buffers 4294967296 bytes Redo Buffers 5271552 bytes Database mounted.Database opened.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> @?/rdbms/admin/catpatch.sqlDOC> BEGIN CATPATCH.SQL */PL/SQL procedure successfully completed. Session altered.Session altered.8 rows deleted.1 row updated.Commit complete.4785 rows updated.。
oracle升级操作流程

数据库版本升级操作手册目录备份数据库 (3)升级Oracle软件 (3)修改ORACLE_HOME (12)升级实例 (13)手工使用脚本升级实例 (14)升级遇到问题的解决办法 (15)检查升级后的版本信息和无效对象 (16)附录 (17)本文用于指导oracle数据库由版本11。
2.0.1.0升级到版本11.2.0。
3.0升级步骤如下:➢备份数据库➢升级oracle 软件➢修改ORACLE_HOME➢升级实例➢检查升级后的版本信息和无效对象备份数据库由于oracle升级存在一定风险,所以在升级前一定要对已有数据进行备份。
1、停掉所有使用数据库的相关程序,以及数据库。
2、对数据库文件进行冷备份.备份后的文件可转存到异机或在本地存放。
升级Oracle软件1、获取oracle升级软件p1*******_112030_Linux—x86—64_1of7.zip 及p1*******_112030_Linux—x86—64_2of7.zip。
2、将其上传到数据库服务器的/tmp/目录下并解压.unzip p1*******_112030_Linux-x86-64_1of7。
zipunzip p1*******_112030_Linux—x86—64_1of7.zip3、解压后,会在当前目录下生成一个database目录.4、切换到oracle用户,执行oracle升级脚本。
5、s u - oracle/tmp/database/runInstaller6、不需要进行任何更改,直接点击下一步。
7、选择跳过软件更新,点击下一步。
8、选择升级现有数据库,点击下一步。
9、语言选择简体中文和英语,点击下一步。
10、选择企业版,并点击下一步。
11、Oracle基目录无需更改,软件位置需要更改为新的位置,这样可以减少宕机时间,是oracle所推荐的方法。
如下图我们将软件安装位置选择为/home/oracle/oracle11g3,修改后,点击下一步。
oracle11g直接升级oracle19c操作手册

11. 准备工作1.1 备份现有数据库在进行任何升级操作之前,首先要备份现有的 Oracle 11g 数据库。
1.1.1全库备份:sh代码:rman target /RMAN> BACKUP DATABASE PLUS ARCHIVELOG;1.数据泵导出(可选):sh代码:expdp system/password@<service_name> full=Y directory=<directory_name> dumpfile=full_backup.dmp logfile=full_backup.log1.2 检查兼容性确保现有的 Oracle 11g 数据库与 Oracle 19c 兼容。
1.运行预升级信息工具:下载并运行Oracle 提供的预升级信息工具(preupgrade.jar)。
sh代码:java -jar preupgrade.jar TERMINAL TEXT2.检查输出:根据工具输出的信息,解决所有兼容性问题。
1.3 环境准备确保目标服务器满足 Oracle 19c 的系统要求。
1.检查系统要求:•操作系统版本•内存•磁盘空间2.设置环境变量:sh代码:export ORACLE_HOME=/path/to/oracle19c_homeexport PATH=$ORACLE_HOME/bin:$PATH22. 安装 Oracle 19c 软件2.1 下载 Oracle 19c 软件从 Oracle 官方网站下载 Oracle 19c 安装包。
2.2 安装 Oracle 19c 软件1.解压安装包:sh代码:unzip LINUX.X64_193000_db_home.zip -d /path/to/oracle19c_home2.运行安装程序:sh代码:/path/to/oracle19c_home/runInstaller3.安装选项:•选择“安装数据库软件”。
医院信息系统ORACLE数据库升级解决方案

级 。本 文论 述 了数 据库 升 级 的整 个 过 程 , 对 其 中 的一 些 细 节 进 行 了 说 明 。 并
[ 关键 词】 医院信息系统 ; ORACL E数据库 ; 数据库升级 [ 中图分类号 】 3 1 12 3 TP 1 .3 . [ 文献标志码 】 A
、 ’
[ 文章编号 】0 7 50 2 0 )7 0 0 2 10 —7 1 (0 70 —0 3 —0
8 16 工作于归档模式下 , a l8 16数据库安装在 D: O— .. , Or ce . . \
r ee目录 下 。 al
13 实 现 方 法 .
利用主服务器和备用服务器 , 先升级备用服务器 ,主服务 器不动 。 如果升级成功 , 则将业务移到备用服务器上 , 然后 再升 级 主服务器。 如果不成功 , 则继续使用 主服务器 。 升级数据选择
真 对待 和 解 决 的 。
Or ce . . , a l7 3 3 工作于归档模式下 , a l7 3 3 Or ce . . 数据库安装在
D: Or n \ a t目录 下 。
升级 后 的软 件 环 境 为 : i2 0 ev r ( P ) +Orce w n 0 0S r e S 4 al
升级数据库 的方法有 很多 ,对 于医院数据库管 理人员来 说, 需要根据医院的实际情况而定 。 我们对升级方法的要求 : 首 先, 对正常工作影 响小 ,因升级而停服务 的时间越短越好 。其 次, 具有高度 的安全性 , 保证不会造成数据丢失。所 以, 我们选 择先升级备用服务器 ,a a a e Up r d f Ho p t lI f r a i n S s e o u i n f rO t b s g a e o s ia n o m to y t m
Oracle 11g R2 升级方案

Oracle 11g R2 升级方案一、版本升级路线Table 2-1 contains the required upgrade path for each release of Oracle Database. Use the upgrade path and the specified documentation to upgrade your database.Table 2-1 Upgrade Paths二、滚动升级Table 1-2 summarizes the various methods for performing rolling upgrades. Also, see Oracle Database High Availability Best Practices for help choosing a method to perform database upgrades.Table 1-2 Methods for Performing Rolling Upgrades三、升级方法Depending on the environment, there are several alternatives available when upgrading a database. This section discusses why a particular method would be chosen, lists considerations when using each method, and gives pointers to additional useful information.Database Upgrade Assistant (DBUA)The DBUA provides a graphical user interface (GUI) that guides a user through the in-place upgrade of a database. It is the recommended method for performing either a major release upgrade or patch release upgrade.The DBUA automates the upgrade process by performing all of the tasks that would otherwise need to be performed manually. It can be launched during installation of Oracle Database 11g Release 2 with the Oracle Universal Installer or it can be launched as a standalone tool at any time after installation is complete.The DBUA is a very useful tool, because it evaluates the current database and makes appropriate recommendations for configuration options such as tablespace sizes, cluster checks, initialization parameters, and Automatic Storage Management upgrades.DBUA is a good choice if the upgrade environment has the following characteristics: ∙Operating system remains the same (including upgrades in the same OS family, such as Windows XP to Windows Vista or Solaris 2.8 to Solaris 2.10)∙Graphical user interface is preferred over manual interface∙Real Application Clusters or Automatic Storage Management is installedo Much easier and less error prone than manual method – HIGHLY recommended!∙Existing database is at least 9.2.0.4 for Oracle Database 11g Release 1 and 9.2.0.8 for Oracle Database 11g Release 2Considerations for using DBUA:∙Databases must be on the same system (in-place upgrade where the new version of Oracle is installed on the same server as the existing version). The DBUA cannot upgrade a database remotely.For more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade page on OTN∙Complete Checklist to Upgrade to 11g Release 2 using DBUA (My Oracle Support Note 870814.1))Manual Upgrad eA manual upgrade consists of running SQL scripts and utilities from a command line to do an in-place upgrade of a database to the new Oracle Database 11g release. Although a manual upgrade gives finer control over the upgrade process, it is more susceptible to error if any of the upgrade steps are not followed or are performed out of order.Unlike the DBUA, the Pre-Upgrade information Tool (utlu111i.sql) that is shipped with the Oracle Database 11 software must be run manually to see what changes must be made to the target database. It performs checks on configuration options such as components, init parameters, and tablespace sizes.Manual upgrade is a good choice if the upgrade environment has the following characteristics: ∙Manual interface is preferred over graphical user interface∙Existing database is at least 9.2.0.4 for Oracle Database 11g Release 1 and 9.2.0.8 for Oracle Database 11g Release 2 (1 step upgrade). Manual upgrades can be done for databases before 9.2.0.x, but 2 steps are required versus 1. For example, if upgrading from 8.1.7.4, it is necessary to first upgrade to 10.2.0.x and then to 11.1 or 11.2. Considerations for manual upgrade:∙Cannot change operating system architectureFor more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade page on OTN∙Complete Checklist for Manual Upgrades to 11g Release 2 (My Oracle Support Note 837570.1))Oracl e Data Pump Export and Import / Original Export and ImportIn this method, the Export and Import utilities physically copy data from the current database to a new database. When upgrading from Oracle Database 10g or higher, Data PumpExport and Import are strongly recommended for improved performance and better manageability.Oracle Data Pump Export/Import and original Export/Import perform a full or partial export from the current database, followed by a full or partial import into a new Oracle Database 11g.In order to have two physical copies of the database, along with the dump file set, a significant amount of disk space may be required. However, the user has the flexibility (especially with Data Pump) to choose subsets of the database to export such as tablespaces, schemas, tables, and rows, leaving the original database unchanged. In addition, Data Pump Export/Import has two features that can help with this issue. First, Data Pump Import can be used in Network Mode, which allows the new Oracle database to be directly loaded across the network from the old database being upgraded. Thus, no intervening dump files are required. Second, when using Data Pump Export and Import in Oracle Database 11g, the imported data can be compressed with the Oracle Advanced Compression Option to improve performance (only when going from 11g Release 1 to Release 2 or for patch set upgrades from Oracle Database 11g onward).Data Pump Export/Import and original Export/Import do not change the existing database, which enables the database to remain available throughout the upgrade process. Data Pump Export and Import use Flashback technology to get a consistent view of the data. However, neither Data Pump Export/Import nor original Export/Import provide consistent snapshots by default.Because the current database can remain available, the existing production database can be kept available for read-only transactions while the new Oracle Database 11g database is being built at the same time by Data Pump Export/Import or original Export/Import. The current database can then be deleted once the upgraded system is determined to be fully functional.Note that Data Pump Export/Import is supported starting in Oracle Database 10g. When upgrading an Oracle database that is older than 10g, original Export and Import must be used. Data Pump Export/Import or Export/Import is a good choice if the upgrade environment has the following characteristics:∙Migration to different operating system architecture or hardware platform∙Source database is running on a version such as 8.0.3 or 8.1.6 that is not directly upgradable to the target version∙Side-by-side testing of the old and new versions of Oracle Database is needed (because an entirely new database is created)∙New database will be restructured (i.e. new tablespaces will be created and populated by imported data, or a new partitioning scheme will be implemented)Considerations for using Data Pump Export/Import or Export/Import:∙Downtime will be much longer than other methods, depending on size of the database(i.e. 10+ hours for large databases). This can be tested by running a test export into thefile system and then doubling or tripling the amount of time that would be required for the subsequent import.∙Additional disk space will be necessary to store both the export dump files and the new copy of the databaseFor more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Utilities 11g Release 2 (Part Number E10701-02)∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade web page on OTN∙Oracle Database Utilities web page on OTNOracl e Transportable TablespacesOracle Transportable Tablespaces (TTS) is an option for performing database upgrades in less than one hour for databases that have simple schemas and where the data files do not need to be transferred as part of the transport process (such as when the data files will be used in place, or when shared storage is available in a system migration).With this method, an empty 11g Release 2 database is created and data is moved from the existing database to the 11g Release 2 database. Metadata for tables and indices and the objects needed to support the tables and indices in the tablespaces is exported from the existing database and then imported into the new database using Data Pump Export/Import or original Export/Import. The majority of time taken for the upgrade is for the metadata export and import, and this is where there may be less than optimal performance.Transportable Tablespaces has been used effectively to reduce database upgrade time. However, because it was not originally designed as a database upgrade solution, it does not have the same level of automation as the DBUA. Consider whether the added testing time and complexity of using a TTS upgrade are worth the potential to reduce downtime during the upgrade.Starting with Oracle Database 10g, tablespaces can be moved across platforms. Many, but not all platforms are supported for cross platform tablespace transport. A cross-endian move involves an RMAN convert, but is a simple operation across platforms within the same endian group.Note that the time needed for the RMAN convert is essentially equivalent to the time needed for an RMAN backup of the database.Transportable Tablespaces is a good choice if the upgrade environment has the following characteristics:∙Downtime must be less than one hour∙Data files do not need to be transferred as part of the transport process∙Existing database’s object structure is not complexConsiderations when using Transportable Tablespaces:∙Metadata gets transported from the existing database to the new database and may increase upgrade time. If desired, a time estimate can be obtained by performing a metadata-only export on the source database.∙Higher level of skill is required for the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2 (Part Number E10595-04)∙Database Upgrade Using Transportable Tablespaces: Oracle Database 11g Release 1 white paper∙Platform Migration Using Transportable Tablespaces: Oracle Database 11g Release 1white paper∙Platform Migration Using Transportable Database: Oracle Database 11g and 10g Release 2 white paperOracl e Data Guard SQL Apply (Logical Standby)Starting with Oracle Database 10 (10.1.0.3), Data Guard SQL Apply (logical standby) can be used to perform a database rolling upgrade with minimal downtime. The upgrade can be to a higher Oracle Database release or a later patch set. The overall downtime can be as little as the time it takes to perform a switchover.What is Oracle Data Guard? Oracle Data Guard provides the management, monitoring, and automation software infrastructure to create and maintain one or more standby databases to protect Oracle data from failures, disasters, errors, and data corruptions. There are two types of standby databases. A physical standby uses Redo Apply to maintain a block for block, exact replica of the primary database. A logical standby uses SQL Apply and contains the same logical information as the primary database, although the physical organization and structure of the data can be different. SQL Apply also enables rolling upgrades by allowing the synchronization of a standby database with a primary database that is using an earlier release of the Oracle Database.A database rolling upgrade entails first upgrading a logical standby database to a later Oracle release or patch set, and then allowing SQL Apply to re-synchronize the primary and standby databases. When the administrator is satisfied that the upgrade has been successful, the process is completed by using a Data Guard switchover operation to transition the standby to the primary role. The only downtime experienced by applications is the time needed to complete the switchover process and reconnect clients to the new primary database. The actual database upgrade is performed while applications continue to access the original production database.Beginning with Oracle Database 11g, Data Guard physical standby users can also benefit from rolling database upgrades by temporarily converting a physical standby to a transient logical standby database, enabling SQL Apply to synchronize the primary and standby databases while they operate at different Oracle releases or patch sets. The transient logical process is attractive because it can use existing physical standby databases and it only requires a single catalog upgrade to migrate both primary and standby databases to the new Oracle release. When the upgrade to process is complete, the configuration reverts to its original state of having a primary with a physical standby database.Oracle Data Guard SQL Apply is a good choice if the upgrade environment has the following characteristics:∙Oracle Data Guard SQL Apply is installed∙Minimal downtime is a requirement∙Current database is at least 10.1.0.3Considerations when using Oracle Data Guard SQL Apply:∙Operating systems must be the same∙Higher level of skill is required for the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2∙Oracle Maximum Availability Architecture Best Practices web page on OTN∙Database Rolling Upgrade Using Data Guard SQL Apply – Oracle Database 11g and 10g R2 white paper∙Database Rolling Upgrade Using Physical Standby Databases and the Transient Logical Rolling Upgrade ProcessOnline Database Upgrad e with Oracle StreamsOracle Streams can be used to achieve little or no database downtime during database or patchset upgrades. A database can be migrated to different platform, for example Intel Solaris to Intel Linux, or to a different character set. A copy of the current database is upgraded using Oracle Streams to keep changes synchronized during the upgrade process. The only downtime that occurs is during the switch from the current database to the new database.Oracle Streams is a good choice if the upgrade environment has the following characteristics: ∙Operating systems are different∙Little or no downtime is a requirement∙Current database is at least 9.2Considerations when using Oracle Streams:∙Performance restrictions may occur in an OLTP environment if the copy of the database does not keep up with existing database∙Significant amount of expertise is required by the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2∙Oracle Streams Concepts and Administration 11g Release 2, Appendix D (Part Number E10704-02)结论Database Upgrade Assistant is the preferred method for upgrading a database to Oracle Database 11g Release 2. However, it is not always possible to use the DBUA, and in such situations there are other options available.Choosing the appropriate upgrade method depends on the environment, amount of downtime that is acceptable, and tolerance for complexity of the database administrator doing the upgrade. It is important for the database administrator to understand the various upgrade methods and choose the one that best suits business requirements.四、方法比较五、方法建议根据实际情况,涉及到服务器操作系统更换版本,数据库版本升级,较短停机时间。
Oracle12c升级指南

Oracle12c升级指南1. 概述升级路线图从18c开始,如果想要直接升级到Oracle 18c,对于源库版本要求越来越高了。
Oracle已经彻底放弃了Oracle 11.2.0.3之前版本直接升级到18c。
具体升级路线,请查看下表当前版本号说明12.2.0.1,12.1.0.1,12.1.0.211.2.0.3, 11.2.0.4支持直接升级到18c11.2.0.1, 11.2.0.211.1.0.6, 11.1.0.710.2.0.2,10.2.0.3, 10.2.0.4 和10.2.0.510.1.0.59.2.0.8及更早版本不支持直接升级到18c.解决方法:1)只能先升级到支持直接升级到18c的中间版本,然后再次升级到18c2)使用数据泵直接将数据迁移到新版本数据库中源库过度版本目标数据库版本11.2.0.1/11.2.0.2-->11.2.0.3/11.2.0.4-->18.x11.1.0.6/11.1.0.7-->11.2.0.3/11.2.0.4-->18.x10.2.0.2, 10.2.0.3, 10.2.0.4, 10.2.0.5-->11.2.0.3/11.2.0.4/12.1.0.1/12.1.0.2-->18.x10.1.0.5-->11.2.0.3/11.2.0.4/12.1.0.1/12.1.0.2-->18.x9.2.0.8 or earlier-->11.2.0.3/11.2.0.4-->18.xOracle版本发布与支持时间参考文档Oracle 12cR1 Upgrade Companion (文档 ID 1462240.1)Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1) (文档 ID 1503653.1)Complete Checklist for Upgrading to Oracle Database 12c Release 1 using DBUA (文档 ID 1516557.1)Release Schedule of Current Database Releases (文档 ID 742060.1)How to Upgrade to Oracle Database 12c Release1 (12.1.0) and Known Issues (文档 ID 2085705.1)Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalone Environment (Non-RAC) (文档 ID 1520299.1) Database Server Upgrade/Downgrade Compatibility Matrix (文档 ID 551141.1)2. 10gR2、11gR1或11gR2升级12cR12.1. 操作系统要求Oracle Database (RDBMS) on Unix AIX,HP-UX,Linux,Solaris and MS Windows Operating Systems Installation and Configuration Requirements Quick Reference (12.1) (文档 ID 1587357.1)Document 1517948.1 Requirements for Installing Oracle Database 12.1 on Solaris 10 SPARCDocument 1525614.1 Requirements for Installing Oracle Database 12.1 on Solaris 11 SPARCDocument 1529433.1 Requirements for Installing Oracle Database 12.1 on RHEL5 or OL5 64-bit (x86-64)Document 1529864.1 Requirements for Installing Oracle Database 12.1 on RHEL6 or OL6 64-bit (x86-64)Document 1961997.1 Requirements for Installing Oracle Database 12.1 on RHEL7 or OL7 64-bit (x86-64)Document 1519770.1 Requirements for Installing Oracle Database 12.1 64-bit (AMD64/EM64T) on SLES 11Document 1961277.1 The Oracle Database 12c Install Options and the Installed Components2.2. 12.1.0.2重要的补丁包为了避免升级过程中出现问题,安装12.1.0.2版本后打上如下补丁包,避免相关问题20369415、215507772.3. 源库要求和建议1)版本要求根据升级要求,在原数据库上升级,对原数据库的版本要求如下:10gR2不能低于10.2.0.511gR1不能低于11.1.0.711gR2不能低于11.2.0.2PSU补丁:Quick Reference to Patch Numbers for Database/GI PSU, SPU(CPU), Bundle Patches and Patchsets (文档 ID 1454618.1)2)升级前建议做个备份 3)确保升级前Oracle系统对象和组件全部是VALID状态。
oracle升级方案

Oracle升级方案1. 简介Oracle是一种强大的关系数据库管理系统(RDBMS),被广泛用于企业级应用程序。
随着时间的推移,Oracle不断推出新的版本和升级,以提供更好的性能、功能和安全性。
本文档旨在介绍Oracle数据库升级的一般步骤和最佳实践。
2. 升级前的准备工作在进行Oracle数据库升级之前,需要进行一些准备工作,以确保顺利完成升级过程,并最大程度地减少潜在的风险和中断。
以下是一些准备工作的关键部分:2.1. 确定升级类型首先,需要确定要执行的Oracle升级类型。
可以是小版本的升级,例如从Oracle 11.2.0.2到11.2.0.4,也可以是大版本的升级,例如从Oracle 11g到Oracle 12c。
2.2. 评估硬件和软件要求在选择升级版本之前,需要评估现有硬件和软件的要求。
必须确保新版本的Oracle数据库可以在现有硬件上运行,并且与现有的操作系统和其他应用程序兼容。
2.3. 创建备份在进行任何数据库升级之前,最重要的一步是创建完整的数据库备份。
这样,在升级过程中出现任何问题或数据丢失的风险时,可以恢复到原始状态。
2.4. 检查数据库健康状况在升级之前,建议进行数据库的健康检查和性能评估。
可以使用Oracle提供的工具,例如Enterprise Manager或AWR报告,来评估数据库的性能和稳定性。
2.5. 计划测试环境在进行升级之前,应该创建一个测试环境,用于模拟实际的升级流程。
可以将生产环境的数据库和应用程序复制到测试环境,以便测试升级过程和验证应用程序的兼容性。
3. 升级过程一旦完成了准备工作,就可以开始实施Oracle数据库的升级。
下面是一个一般的升级过程:3.1. 升级前检查在进行升级之前,需要执行一些先决条件检查,以确保满足升级的要求。
这些检查通常涉及硬件和软件的一些要求,并可以使用Oracle提供的预升级检查工具来执行。
3.2. 安装升级程序安装升级程序是升级过程的下一步。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Oracle数据库升级技术方案Oracle Database Upgrade Support目录一说明 (3)二前期准备工作 (4)2.1系统检查 (4)2.2操作系统补丁包检查 (5)2.3系统组件检查 (5)2.4无效对象检查 (5)2.5 temp文件检查 (6)2.6 SYS和SYSTEM重复对象检查 (6)2.7配置闪回操作 (7)2.8前期11.2.0.3软件安装 (7)三创建回退方案 (7)3.1关闭数据库,停监听,停dbconsole 停容灾 (7)3.2 创建闪回点 (7)3.3备份控制文件和redo (8)四数据库升级前检查 (8)五数据库升级 (8)六升级结束后数据库检查 (9)七升级失败的回退措施 (9)7.1重定向10g目录 (9)7.2闪回数据库 (10)7.3 dd还原redo和控制文件 (10)7.4重建控制文件 (10)7.5查看Tempfile (11)一说明数据库为10g单机环境,目标升级为11g环境,操作系统为5,实例名称:zhcj 综合采集IP:130.36.6.8二前期准备工作2.1系统检查针对zhcj数据库进行基本的操作系统检查,包括系统配置,版本,操作系统内存,交换分区,tmp 空间,必要的操作系统包检查,无效对象检查。
包检查:bos.adt.basebos.adt.libbos.adt.libmbos.perf.libperfstat 5.3.9.0 or laterbos.perf.perfstatbos.perf.proctoolsxlC.aix50.rte.10.1.0.0 or latergpfs.base 3.2.1.8 or laterP570A_ZHCJ:/# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat bos.perf.perfstat bos.perf.proctools xlC.aix50.rte gpfs.base <Fileset Level State Description----------------------------------------------------------------------------Path: /usr/lib/objreposbos.adt.base 5.3.9.0 COMMITTED Base Application DevelopmentToolkitbos.adt.lib 5.3.9.0 COMMITTED Base Application DevelopmentLibrariesbos.adt.libm 5.3.9.0 COMMITTED Base Application DevelopmentMath Librarybos.perf.libperfstat 5.3.9.0 COMMITTED Performance Statistics LibraryInterfacebos.perf.perfstat 5.3.9.0 COMMITTED Performance StatisticsInterfacebos.perf.proctools 5.3.9.0 COMMITTED Proc Filesystem ToolsxlC.aix50.rte 10.1.0.0 COMMITTED XL C/C++ Runtime for AIX 5.3Path: /etc/objreposbos.perf.libperfstat 5.3.9.0 COMMITTED Performance Statistics LibraryInterfacebos.perf.perfstat 5.3.9.0 COMMITTED Performance StatisticsInterfacelslpp: Fileset gpfs.base not installed.2.2操作系统补丁包检查以下补丁包需要安装:•IZ42940•IZ49516•IZ52331•P570A_ZHCJ:/#instfix -i -k "IZ42940 IZ49516 IZ52331"以上补丁包需要安装2.3系统组件检查SQL> select comp_name,version,status from dba_registry;COMP_NAME VERSION STATUS---------------------------------- --------- -----------Oracle interMedia 10.2.0.4.0 VALIDOracle Enterprise Manager 10.2.0.4.0 VALIDOracle XML Database 10.2.0.4.0 VALIDOracle Text 10.2.0.4.0 VALIDOracle Expression Filter 10.2.0.4.0 VALIDOracle Rules Manager 10.2.0.4.0 VALIDOracle Workspace Manager 10.2.0.4.3 VALIDOracle Data Mining 10.2.0.4.0 VALIDOracle Database Catalog Views 10.2.0.4.0 VALIDOracle Database Packages and Types 10.2.0.4.0 INVALIDJServer JAVA Virtual Machine 10.2.0.4.0 VALIDOracle XDK 10.2.0.4.0 VALIDOracle Database Java Packages 10.2.0.4.0 VALID相关组件失效,检查由于sys用户下的包失效造成:SQL> select object_name,status from dba_objects where owner='SYS' and status<>'VALID';OBJECT_NAME STATUS--------------------------- ----------DBMS_SWRF_REPORT_INTERNAL INVALID升级前需要对该包进行重新编译修复该组件2.4无效对象检查sqlplus “/as sysdba”spool invald.lstselect owner,object_name,object_type,status from dba_objects where status<>'VALID';SQL> select count(*),status from dba_objects group by status;COUNT(*) STATUS---------- -------52311 VALID358 INVALIDcreate table invalid_object_20120515 as select * from dba_objects wherestatus<>’VALID’;2.5 temp文件检查select tablespace_name , file_name,bytes/1024/1024 ,status from dba_temp_files order by 1TABLESPACE_NAME FILE_NAME BYTES/1024/1024 STATUS--------------- ------------------------ --------------- ---------TEMP /dev/rzhcj01_4g_003 4095 AVAILABLETEMP /dev/rzhcj02_4g_079 4095 AVAILABLETEMP /dev/rzhcj01_4g_127 4095 AVAILABLETEMP /dev/rzhcj01_4g_191 4095 AVAILABLETEMP /dev/rzhcj02_4g_084 4095 AVAILABLETEMP /dev/rzhcj02_4g_080 4095 AVAILABLETEMP /dev/rzhcj02_4g_081 4095 AVAILABLETEMP /dev/rzhcj02_4g_082 4095 AVAILABLETEMP /dev/rzhcj02_4g_083 4095 AVAILABLETEMP /dev/rzhcj01_4g_192 4095 AVAILABLE2.6 SYS和SYSTEM重复对象检查SQL> select object_name, object_type from dba_objects where (object_name,object_type) in (select object_name,object_type from dba_objects where owner = 'SYS') and owner = 'SYSTEM';OBJECT_NAME OBJECT_TYPE----------------------- -------------------AQ$_SCHEDULES TABLEAQ$_SCHEDULES_PRIMARY INDEXDBMS_REPCAT_AUTH PACKAGEDBMS_REPCAT_AUTH PACKAGE BODY以上为正常并且允许重复的对象。
2.7配置闪回操作检查数据库(主备)是否有配置闪回区域,如果没有,配置闪回区域和闪回路径,升级结束后取消设置闪回目录大小和闪回地址:Alter system set db_recovery_file_dest_size=15G scope=bothAlter system set db_recovery_file_dest=’/archlog/backup/flashback’; scope=both 2.8前期11.2.0.3软件安装安装最新的11.2.0.3数据库软件以及最新PSU补丁13696216 和13916709三创建回退方案3.1关闭数据库,停监听,停dbconsole 停容灾$ export ORACLE_SID=zhcj$ sqlplus / as sysdba$ shutdown immediateEmctl stop dbconsole3.2 创建闪回点$ export ORACLE_SID=zhcj$ sqlplus / as sysdbaSQl>startup mountSQL>create restore point upgrade_point guarantee flashback database;3.3备份控制文件和redo2.备份redo和controlfile查找reodo文件:select group#,member from v$logfile;检查对应VG是否具有4K偏移量:$ dbfsize rzhcj01_4g_005Database file: rzhcj01_4g_005Database file type: raw deviceDatabase file size: 524160 8192 byte blocks以上说明lv上有4K偏移量通过dd做备份(前期检查VG发现对应具有4K偏移量):dd if=/dev/rzhcj01_1g_002 of=/archlog/backup/bak/rzhcj01_1g_002.bak bs=4096 skip=1 dd if=/dev/rzhcj02_1g_002 of=/archlog/backup/bak/rzhcj02_1g_002.bak bs=4096 skip=1 dd if=/dev/rzhcj01_1g_003 of=/archlog/backup/bak/rzhcj01_1g_003.bak bs=4096 skip=1 dd if=/dev/rzhcj02_1g_003 of=/archlog/backup/bak/rzhcj02_1g_003.bak bs=4096 skip=1 dd if=/dev/rzhcj01_1g_004 of=/archlog/backup/bak/rzhcj01_1g_004.bak bs=4096 skip=1 dd if=/dev/rzhcj02_1g_004 of=/archlog/backup/bak/rzhcj02_1g_004.bak bs=4096 skip=1 控制文件:dd if=/dev/rzhcj01_1g_001 of=/archlog/backup/bak/rzhcj01_1g_001.bak bs=4096 skip=1 dd if=/dev/rzhcj02_1g_001 of=/archlog/backup/bak/rzhcj02_1g_001.bak bs=4096 skip=1四数据库升级前检查拷贝11g$ORACLE_HOME/rdbms/admin/utlu112i.sql 至/tmp/upgrade运行该脚本,检测升级环境sqlplus '/as sysdba'SQL> spool Database_Info.logSQL> @ utlu112i.sql。