Statement ************************************************************** *********
Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the source, otherwise hold the copyright legal responsibility.
Please leave a message or email ([email protected]) to indicate the error.
This reprint must be kept here: http://blog.csdn.net/huangyanlong/article/details/39677103
Deep Blue Blog: Http://blog.csdn.net/huangyanlong
*************************************************************************************************************** *************
Prerequisite: After installing the Oracle software, DBCA built the library
Goal: Complete Oracle software upgrade from 10.2.0.1.0 to 10.2.0.5.0
1. View database status, version
[Email protected] ~]$ sqlplus '/as sysdba '
Sql*plus:release 10.2.0.1.0-production on Wed Sep 17 18:27:42 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the partitioning, OLAP and Data Mining options
Sql> select Instance_name,status from V$instance;
instance_name STATUS
---------------- --------------------
Hyldb OPEN
Sql> select Comp_name,version,status from Dba_registry;
2. Unzip the installation package
Locate the upgrade installation package for oracle10g as follows:
Unpack the Tarball
[Email protected] soft]# Unzip P8202632_10205_linux-x86-64.zip
3. Close the database
[Email protected] ~]$ sqlplus '/as sysdba '
Sql*plus:release 10.2.0.1.0-production on Mon Sep 29 10:23:51 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the partitioning, OLAP and Data Mining options
sql> shutdown immediate;
--Guanqu
Database closed.
Database dismounted.
ORACLE instance shut down.
[Email protected] ~]$ Lsnrctl statuse
--Verify that the monitoring has stopped
Lsnrctl for linux:version 10.2.0.1.0-production on 29-sep-2014 10:30:51
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (Address= (PROTOCOL=TCP) (host=) (port=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 10.2.0.1.0-production
Start Date 29-sep-2014 09:54:36
Uptime 0 days 0 hr. Min. sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Log File/u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (host=hyl) (port=1521)))
The listener supports no services
The command completed successfully
4. Data Backup
A backup is required here in the production environment to avoid data loss when the upgrade fails, omitted from this article.
5. Upgrading Oracle software
Remotely invoke the graphical interface, as in the example:
Skip the request package check here, click Yes to continue, such as:
[Email protected] ~]#/u01/app/oracle/product/10.2.0/db_1/root.sh
--Execute script as prompted
Running Oracle 10g root.sh script ...
The following environment variables is set as:
Oracle_owner= Oracle
Oracle_home=/u01/app/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "Dbhome" already exists in/usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome To/usr/local/bin ...
The file "Oraenv" already exists in/usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv To/usr/local/bin ...
The file "Coraenv" already exists in/usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv To/usr/local/bin ...
Entries'll be added to The/etc/oratab file as needed by
Database Configuration Assistant When a database is created
Finished running generic part of root.sh script.
Now product-specific root actions would be performed.
After executing the script, click on the interface OK and go to the end interface as follows:
6. Upgrading the Database
[Email protected] ~]$ sqlplus '/as sysdba '
Sql*plus:release 10.2.0.5.0-production on Mon Sep 29 11:05:28 2014
Copyright (c) 1982, Oracle. All rights Reserved.
Connected to an idle instance.
Boot to upgrade state
Sql> startup upgrade;
ORACLE instance started.
Total System Global area 167772160 bytes
Fixed Size 2094800 bytes
Variable Size 75499824 bytes
Database buffers 83886080 bytes
Redo buffers 6291456 bytes
Database mounted.
Database opened.
Upgrade Data dictionary
sql> spool/u01/app/oracle/update_log/cpu_up.log//input script information into a log file
Sql> @?/rdbms/admin/catupgrd.sql//Start run script, upgrade data dictionary, about 10 minutes
Sql> spool off; --End log file
sql> shutdown immediate; --Guanqu
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> Startup --Normal Qicu
ORACLE instance started.
Total System Global area 167772160 bytes
Fixed Size 2094800 bytes
Variable Size 150997296 bytes
Database buffers 8388608 bytes
Redo buffers 6291456 bytes
Database mounted.
Database opened.
Sql> @?/rdbms/admin/utlrp.sql--Execute the script
Sql> select * from Utl_recomp_errors;
Sql> Col comp_name for A30
Sql> col status for A20
Sql> Col VERSION for A10
Sql> Set Linesize 200
Sql> select Comp_name,version,status from Dba_registry;
Sql> Show Parameter Comp
Modify compatibility
Sql> alter system set compatible= ' 10.2.0.5.0 ' scope=spfile;
sql> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
This completes the database upgrade from 10.2.0.1.0 to the 10.2.0.5.0 version.
7. Complete
[Email protected] ~]$ sqlplus '/as sysdba '
--Landing database
Sql*plus:release 10.2.0.5.0-production on Mon Sep 29 11:57:49 2014
Copyright (c) 1982, Oracle. All rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options
Summary
Comparing the process of CPU upgrade before and after DBCA, the obvious difference will be found:
1, did not carry on the DBCA to build the storehouse, only need to carry on the software upgrade, after upgrading builds the storehouse;
2, DBCA after the library (that is, the existence of the database), upgrade the software, you need to upgrade the data dictionary, modify compatibility.
Jane's Mind
CPU Upgrade (10.2.0.1.0-10.2.0.5.0) |
Conditions |
Operation |
Subsequent |
Existence Library |
Upgrade software |
Subsequent build libraries |
No libraries exist |
Upgrade Software + data dictionary + compatibility |
Complete the upgrade Direct Access library |
Statement ************************************************************** *********
Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the source, otherwise hold the copyright legal responsibility.
Please leave a message or email ([email protected]) to indicate the error.
This reprint must be kept here: http://blog.csdn.net/huangyanlong/article/details/39677103
Deep Blue Blog: Http://blog.csdn.net/huangyanlong
*************************************************************************************************************** *************
Upgrade-Open Vision Oracle Graphical upgrade (DBCA upgrade) -10.2.0.1.0 L to 10.2.0.5.0