Upgrade Oracle 11.2.0.1.0 to 11.2.0.3.0

Source: Internet
Author: User

Upgrade Oracle 11.2.0.1.0 to 11.2.0.3.0

View the database version

[Oracle @ RedHat6 ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.1.0 Production on Fri Dec 6 21:12:32 2013

Copyright (c) 1982,200 9, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 208769024 bytes
Fixed Size 2211928 bytes
Variable Size 125833128 bytes
Database Buffers 75497472 bytes
Redo Buffers 5226496 bytes
Database mounted.
Database opened.
SQL> select * from v $ version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
PL/SQL Release 11.2.0.1.0-Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0-Production
NLSRTL Version 11.2.0.1.0-Production

1. decompress and merge the patch package

There are a total of seven patch packages in 11.2.0.3. For the different functions of the seven files, refer to the following link.

Http://blog.csdn.net/tianlesoftware/article/details/6818770

To upgrade the database software, you only need to extract the first and second files, as shown below:

P10404530_112030_Linux-x86-64_1of7.zip

P10404530_112030_Linux-x86-64_2of7.zip

[Oracle @ redhat6 11204_patch_1] $ unzip/opt/oracle11gR2/p10404530_112030_Linux-x86-64_1of7.zip
[Oracle @ redhat6 11204_patch] $ unzip/opt/oracle11gR2/p10404530_112030_Linux-x86-64_2of7.zip

Copy the second decompressed file to the corresponding directory after the first decompressed File

[Oracle @ redhat6 Components] $

/U01/11204_patch/database/stage/Components

[Oracle @ redhat6 Components] $ cp-R */u01/11204_patch_1/database/stage/Components/

2. Main Steps
A. Back up the database (so that the upgrade fails and can be restored)
B. Run patchset and Upgrade oracle software
C. Prepare a new ORACLE_HOME
D. Run dbua or script to upgrade the instance.
E. Check the updated version information and invalid objects.
2.1 close oracle-related services
Lsnrctl stop
Shutdown immediate
Emctl stop dbconsole
2.2 The following directories are used to back up databases:
ORACLE_HOME/dbs
ORACLE_HOME/network/admin
ORACLE_HOME/hostname_dbname
ORACLE_HOME/Solaris/j2ee/OC4J_DBConsole_hostname_dbname
2.3 Upgrade Oracle software

[Oracle @ redhat6 ~] $ Cd/u01/11204_patch_1/database/
[Oracle @ redhat6 database] $ ls
Doc install readme.html response rpm runInstaller sshsetup stage welcome.html

[Oracle @ redhat6 database]./runInstaller








At the end of the installation, run the two scripts orainstRoot. sh and root. sh with the root user.

2.4 copy the file in ORACLE_HOME under 11.2.0.1 to the new ORACLE_HOME, as shown below:

[Oracle @ redhat6 dbs] $ pwd
/U01/app/oracle/product/11.2.0/db_1/dbs
[Oracle @ redhat6 dbs] $ cp */u01/app/oracle/product/11.2.0.3/db_1/dbs/
[Oracle @ redhat6 admin] $ pwd
/U01/app/oracle/product/11.2.0/db_1/network/admin
[Oracle @ redhat6 admin] $ cp-R */u01/app/oracle/product/11.2.0.3/db_1/network/admin/

2.5 modify the oracle configuration file

[Oracle @ redhat6 ~] $ Cat. bash_profile | grep ORACLE_HOME
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0.3/db_1
Export ORACLE_HOME
PATH = $ ORACLE_HOME/bin: $ PATH
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
CLASSPATH = $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
[Oracle @ redhat6 ~] $ Cat/etc/oratab
#

 

# This file is used by ORACLE utilities. It is created by root. sh
# And updated by the Database Configuration Assistant when creating
# A database.

# A colon, ':', is used as the field terminator. A new line terminates
# The entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ ORACLE_SID: $ ORACLE_HOME ::
#
# The first and second fields are the system identifier and home
# Directory of the database respectively. The third filed indicates
# To the dbstart utility that the database shocould, "Y", or shocould not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ ORACLE_SID are not allowed.
#
#
Hjj:/u01/app/oracle/product/11.2.0.3/db_1: Y
2.6 start sqlplus in the new ORACLE_HOME and log on with the as sysdba permission

SQL> SPOOL upgrade_info.log

SQL> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlu112i. SQL

SQL> SPOOL OFF


2.7 shut down the database and restart it.

SQL> shutdown immediate

SQL> starup upgrade -- must be upgrade

[Oracle @ redhat6 ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production on Sun Dec 8 03:16:38 2013

Copyright (c) 1982,201 1, Oracle. All rights reserved.


Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v $ version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
PL/SQL Release 11.2.0.3.0-Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0-Production
NLSRTL Version 11.2.0.3.0-Production

SQL> select status from v $ instance;

STATUS
------------
OPEN MIGRATE

-- Invalid compilation object

SQL> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlrp. SQL

-- Execute the upgrade script

SQL> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/catupgrd. SQL

After execution, it will automatically shutdown immediate, and the execution time is relatively long.

[Oracle @ redhat6 ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production on Sun Dec 8 04:13:52 2013

Copyright (c) 1982,201 1, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 208769024 bytes
Fixed Size 2226936 bytes
Variable Size 142607624 bytes
Database Buffers 58720256 bytes
Redo Buffers 5214208 bytes
Database mounted.
Database opened.
SQL> select status from v $ instance;

STATUS
------------
OPEN

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.