Minor version upgrades for Oracle: Upgrading from 10.2.0.1 to 10.2.0.4
Upgrade package to be prepared: p6810189_10204_linux-x86
1. Current version
Sql> Conn/as SYSDBA
Connected.
Sql> select * from V$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-prod
PL/SQL Release 10.2.0.1.0-production
CORE 10.2.0.1.0 Production
TNS for Linux:version 10.2.0.1.0-production
Nlsrtl Version 10.2.0.1.0-production
2. Upload the upgrade package to Oracle server's OS
3. Stop all Oracle-related services on the server: OEM, isqlplus, database, monitoring
[[email protected] ~]$ emctl stop dbconsole--Stop OEM
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Http://oracle3:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
[[email protected] ~]$ isqlplusctl Stop---stopped isqlplus
Isql*plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Getnameinfo failed
Getnameinfo failed
Isql*plus instance on port 5560 are not running ...
[Email protected] ~]$ Sqlplus/nolog
Sql*plus:release 10.2.0.1.0-production on Fri June 6 09:13:10 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Sql> Conn/as SYSDBA
Connected.
sql> shutdown Immediate--Stop database service
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-production
With the partitioning, OLAP and Data Mining options
[[email protected] ~]$ lsnrctl stop--stop monitoring service
Lsnrctl for linux:version 10.2.0.1.0-production on 06-jun-2014 09:13:28
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1)))
The command completed successfully
4. Upgrade Oracle Software
A Unzip the upgrade package
[Email protected] u01]# Unzip P6810189_10204_linux-x86.zip
B Upgrade DBMS
[Email protected] ~]# Xhost +
Access control disabled, clients can connect from any host
[Email protected] ~]# su-oracle
[Email protected] ~]$ export display= "10.1.1.250:0.0"
[Email protected] ~]$ export Lang=en_us
[Email protected] ~]$ cd/u01/disk1/
[Email protected] disk1]$./runinstaller
No setup, just click "Next" and the final step is to execute the root.sh script under root
[Email protected] ~]# cd/u01/oracle/product/10.2.0/db_1/
[Email protected] db_1]#./root.sh
Running Oracle10 root.sh Script ...
The following environment variables is set as:
Oracle_owner= Oracle
Oracle_home=/u01/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]:
The file "Oraenv" already exists in/usr/local/bin. Overwrite it? (y/n)
[N]:
The file "Coraenv" already exists in/usr/local/bin. Overwrite it? (y/n)
[N]:
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.
Click "OK", "Exit"
5. Upgrade your DB instance (upgrade RDBMS)
Note that since the instance was created under 10.2.0.1, this instance ORCL need to be upgraded, if it is an RDBMS that was created after upgrading to 10.2.0.4, the version is 10.2.0.4.
A to boot the database to the upgrade state
[Email protected] ~]$ Sqlplus/nolog
Sql*plus:release 10.2.0.4.0-production on Fri June 6 09:37:57 2014
Copyright (c) 1982, Oracle. All rights Reserved.
Sql> Conn/as SYSDBA
Connected to an idle instance.
Sql> Startup upgrade
ORACLE instance started.
Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 188744520 bytes
Database buffers 415236096 bytes
Redo buffers 2924544 bytes
Database mounted.
Database opened.
B upgrading the components of an Oracle instance
A SQL script needs to be executed, and the script is copied to the disk when the fourth step of upgrading the DBMS.
sql> @ $ORACLE _home/rdbms/admin/catupgrd.sql
C Create a catalog of components
sql> @ $ORACLE _home/rdbms/admin/catalog.sql
D shut down the database and start normally
sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> Startup
ORACLE instance started.
Total System Global area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 226493256 bytes
Database buffers 377487360 bytes
Redo buffers 2924544 bytes
Database mounted.
Database opened.
E creating packages and stored procedures
sql> @ $ORACLE _home/rdbms/admin/catproc.sql
F compiling an invalid object
sql> @ $ORACLE _home/rdbms/admin/utlrp.sql
sql> SET VERIFY OFF;
Sql>
sql> SELECT dbms_registry_sys.time_stamp (' utlrp_bgn ') as timestamp from dual;
TIMESTAMP
--------------------------------------------------------------------------------
Comp_timestamp UTLRP_BGN 2014-06-06 11:16:29
1 row selected.
Sql> DECLARE
2 threads Pls_integer: = &&1;
3 BEGIN
4 Utl_recomp.recomp_parallel (threads);
5 END;
6/
6. Verification
sql> Col comp_name format A30
Sql> select Comp_name,version,status from Dba_registry;
Comp_name VERSION STATUS
------------------------------ ------------------------------ ----------------------
Oracle Enterprise Manager 10.2.0.4.0 VALID
Spatial 10.2.0.4.0 VALID
Oracle intermedia 10.2.0.4.0 VALID
OLAP Catalog 10.2.0.4.0 VALID
Oracle XML Database 10.2.0.4.0 VALID
Oracle Text 10.2.0.4.0 VALID
Oracle Expression Filter 10.2.0.4.0 VALID
Oracle Rule Manager 10.2.0.4.0 VALID
Oracle Workspace Manager 10.2.0.4.3 VALID
Oracle Data Mining 10.2.0.4.0 VALID
Oracle Database Catalog views 10.2.0.4.0 VALID
Oracle Database Packages and T 10.2.0.4.0 VALID
Ypes
Jserver JAVA Virtual Machine 10.2.0.4.0 VALID
Oracle XDK 10.2.0.4.0 VALID
Oracle Database Java Packages 10.2.0.4.0 VALID
OLAP Analytic Workspace 10.2.0.4.0 VALID
Oracle OLAP API 10.2.0.4.0 VALID
Rows selected. --Upgrade success
Check if the OEM is upgraded successfully:
[Email protected] ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, Oracle Corporation. All rights reserved.
Http://oracle3:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .... started.................
------------------------------------------------------------------
Logs is generated in Directory/u01/oracle/product/10.2.0/db_1/oracle3_orcl/sysman/log
Oracle's environment Configuration-oracle minor version upgrade