Oracle升级(10.2.0.1-10.2.0.3)
一般情况下我们在安装Oracle软件以后,创建数据库之前就会为Oracle打上补丁,当然没打也没关系,接下里就会介绍Oracle在建库以后
一般情况下我们在安装Oracle软件以后,创建数据库之前就会为Oracle打上补丁,当然没打也没关系,接下里就会介绍Oracle在建库以后的升级过程,DB:Oracle 10G R2 10.2.0.1;OS:Red Hat Linux as 4。Oracle安装参考:
一. 升级前的准备
首先下载并上传补丁包到数据库服务器上,因为我试验使用的是Linux下32位的Oracle 10G R2 10.2.0.1,所以需要的补丁为p5337014_10203_LINUX.zip。补丁直接到Oracle官网上去下,注意对应的版本就可以了。
1. 解压补丁包,得到Disk1文件夹
2. 备份数据库及Oracle相关目录,必须是全备。推荐冷备,一旦升级出现问题恢复也比较快。
二. 升级Oracle软件
1. 安装补丁包,需要用到图形终端。VNC使用参考:
2. 根据一步一步执行,知道提示以root身份运行root.sh脚本
3. 以root身份运行root.sh脚本,,完成后Oracle软件升级完成。
三. 升级数据库
Oracle软件升级完成以后先不忙启动数据库,否则会报如下错误:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 7819
ORA-1092 signalled during: ALTER DATABASE OPEN...
升级数据库有两种方式:DBUA图形化方式及手工升级方式,推荐使用手工升级方式。DBUA图形化方式操作简单,只需按照提示一步一步往下做就可以了,需要注意如果要升级的数据库没有在列表中,需修改/etc/oratab添加相应的SID,升级过程作要勾选“升级完成后编译无效对象”选项。如果在升级之前没有备份,可以在使用DBUA的时候选择备份数据库,DBUA执行的是冷备,需要保留足够的空间。按照提示执行完成以后没有报错就可以finish了。
手工方式先使用echo $ORACLE_SID是否为需要升级的数据库,不是则使用export $ORACLE_SID=sid修改,然后以DBA身份登录SQLPLUS,执行如下操作:
SQL> startup upgrade
SQL> spool /u01/upgrade.log
SQL> @?/rdbms/admin/catupgrd.sql --需要等待较长时间
如果这一步顺利执行,那么数据升级工作已经完成一大半了,接下来重启数据库,编译无效对象。因为catupgrd.sql可能会造成一些数据对象无效,通过语句:select count(1) from dba_objects where status='INVALID'查询是否存在有无效的对象,有则运行utlrp.sql编译无效的对象。
SQL> shutdown immediate;
SQL> startup
SQL> @?/rdbms/admin/utlrp.sql --需要等待较长时间
编译完成以后查询一下表空间,用户,用户对象等信息,如果都没有问题,OK,我们的数据库升级算是成功了,接下来就备份一次数据库,然后打开应用。我们在查询对象的时候可能出现一些名字类似BIN$BD34RX+6TCJEK54334w==$0的对象,这些是保存在回收站里面的删除对象,可以忽略。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
