Oracle11.2.0.1 How to upgrade to 11.2.0.3 Oracle with version upgrade _oracle

Source: Internet
Author: User

Oracle database upgrades are also not simple, and this article gives a more detailed description of Oracle: Oracle database Upgrade or data migration method research

I also belong to Oracle's rookie, will not shortcoming introduced.

Here's a quick summary of Oracle's experience with version upgrades:
To upgrade a database:
1. Check the current version of the database first:SELECT * from V$version;

2. Full-Library backup using Rman or EXP
" This step is very important because the virtual machine is out of space when you upgrade to the data section, causing the VM to crash and the upgrade to fail." The ORCL library was also hung up and had to create a ORCL from another Oracle, and then the cold standby migrated before it could be upgraded again. 】
such as: Rman fully prepared
Export ORACLE_SID=ORCL
Rman Target/
Rman>backup full database plus archivelog//fully-prepared databases, and includes Archivelog.

3. Finally, follow the steps below to upgrade
<1> know the role of Oracle 7 update files First:
The first and two packages represent the database, and if you upgrade the databases, you need only these 2 files.
The third package represents the grid, which is used to upgrade the CRS of RAC. If you upgrade RAC, use this file first.
The fourth represents a client,
The fifth one says Gateways,
The sixth one represents examples, and this is our sample file installation package.

<2> Upgrading Oracle Databases
First and two zip packets are uploaded and unzipped in the same directory because the two directory structures are basically the same, and the contents of the two packages need to be merged to execute the Runinstaller file. All to be decompressed in the same directory, this will merge directly.

<3> Run Runinstaller, if there is no image interface may need to have an answer file, this will need to check again,
When I test, there is a graphical interface, so directly with the graphical interface to upgrade:
Several places to note:
A. This is the first place where you need the dot, "Skip software Updates" To skip to software updates
B. Here is the option to install the new Oracle software location where the old location cannot be written.
Note: Disk space must be 5~10g, Oracle11.2.0.1 upgrade to 11.2.0.3 need 4.1G.
C. 3rd: Need to note:/etc/oratab this document.
Because, the update to the last is to update the database, update the database, you must have a database is running. In order to execute and update the database, it is through the Oratab file that lets you choose to try to update the database through that running database.

4. After the database has been updated, the following things need to be done:
First, after the upgrade is complete, you need to modify Oracle's required environment variables to the upgraded Oracle software path.
Need to modify: Oracle_home.
As in my environment:
When Oracle11.2.0.1:
Oracle_base=/home/oracle/ora
Oracle_home= $ORACLE _base/product/11g/db_1
after the upgrade, the Oracle version is: 11.2.0.3, and the new home directory is:
Oracle11.2.0.3: oracle_home= $ORACLE _base/product/11.2.0.3/db_1

<1> execute this file first, with SYSDBA permissions:

 sql> SPOOL update.info
sql> $ORACLE _home/rdbms/admin/utlu112i.sql sql> SPOOL off

See if there are any errors in the log.

<2> close the database and update the startup.

 sql> shutdown immediate
sql> startup upgrade sql>

select * from V$version; #查看Oracle的版本.  
 sql> Select status from V$instance;
STATUS
------------
OPEN MIGRATE

#下面开始执行升级脚本.  
 sql> SPOOL Update-info.log
sql> @ $ORACLE _home/rdbms/admin/catupgrd.sql 
#下面是查看升级结果的; This is not very sure, because the reference blog environment is,
# 9i 10g
#SQL > @ $ORACLE _home/rdbms/admin/utlu102s.sql
sql> SPOOL off


When you are finished, you will need to review the upgrade log for warranty errors and, if so, to perform the upgrade SQL script again.

 #升级完成后, you need to restart DB.
sql> shutdown immediate
sql> startup 
#下面是执行重新编译无效对象
 sql> @ $ORACLE _home/rdbms/admin/utlrp.sql< c5/> #查看是否还存在无效对象, if 0, the upgrade is complete. Otherwise, the compilation is performed again.  
 sql> SELECT Count (*) from dba_objects WHERE status= ' INVALID ';

Sql> select name from V$database; #确认数据库的SID是否正确.
 sql> Show user; #确认当前是否为sys用户.  
 sql> Select Tablespace_name, bytes from dba_data_files; #确认表空间大小是否正确.

#下面这个步骤网文中没有, this is mentioned in the video, the role is unknown.
#SQL > @ $ORACLE _home/rdbms/admin/catalog.sql

#最后, restart the database no problem is that the upgrade was successful.  
 sql> Select status from V$instance;
STATUS
------------Open
#注意, after the database is successfully opened, this will be open instead of open MIGRATE

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.