search
HomeDatabaseMysql TutorialOracle升级(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的对象,这些是保存在回收站里面的删除对象,可以忽略。

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

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

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

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]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

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

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),