Upgrade Oracle from 10.2.0.1 To 10.2.0.4
1. Patch Set Overview
Patch set release 10.2.0.4. Before installing this patch set you must be need 10.2.0.1 version.
Oracle DB : Oracle 10.2.0.1 (later)
Operating System: Windows
3. Pre - Installation Tasks
1. Identify prior installation
Before installing this patch you must install oracle 10.2.0.1 (or later version)
2. Download Patch set
Download 6810189 patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory.
3. Shutdown oracle database.
C:\>set oracle_sid= GOLDLINK
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 13 10:49:26 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect sys@GOLDLINK as sysdba
ORACLE instance shut down.
4. Stop all services
C:\>net stop OracleDBConsoleGOLDLINK
The OracleDBConsoleGOLDLINK service is stopping................
The OracleDBConsoleGOLDLINK service was stopped successfully.
C:\>net stop OracleServiceGOLDLINK
The OracleServiceGOLDLINK service is stopping.
The OracleServiceGOLDLINK service was stopped successfully.
C:\>net stop OracleOraDB10g_Home1iSQL*Plus..
The OracleOraDb10g_home1iSQL*Plus service was stopped successfully.
C:\>net stop OracleOraDB10g_Home1TNSListener
The OracleOraDb10g_home1TNSListener service is stopping.
The OracleOraDb10g_home1TNSListener service was stopped successfully.
Note: while patch installation time If you face Distributed Transaction Coordinator still running. You should be stop this service
C:\>net stop msdtc
The Distributed Transaction Coordinator service is stopping.
The Distributed Transaction Coordinator service was stopped successfully.
4. Backup your database.
Oracle recommends that you create a backup of the Oracle 10g installation before you install the patch set.
5. Check Tablespace Sizes and Set Parameter Values
Review the following sections before upgrading a database.
8. Upgrade the Database
use runinstaller to INSTALL the PATCH
if any errors like "error in invoking ....." . compile the lib file manually as a oracle user using the following command.
[oracle@localhost bin]$ make -f /ora10gsoft/10.2.0/network/lib/ins_net_client.mkBuilding client shared library libclntsh.so ...
Call script /ora10gsoft/10.2.0/bin/genclntsh ...
genclntsh: genclntsh: Could not locate /ora10gsoft/10.2.0/network/admin/shrept.lst
make: *** [/ora10gsoft/10.2.0/lib/libclntsh.so] Error 1
Note : create a "/ora10gsoft/10.2.0/network/admin/shrept.lst" file manually with any content or blank
[oracle@localhost bin]$ make -f /ora10gsoft/10.2.0/network/lib/ins_net_client.mk
Building client shared library libclntsh.so ...
Call script /ora10gsoft/10.2.0/bin/genclntsh ...
Built /ora10gsoft/10.2.0/lib/libclntsh.so ... DONE
Then press retry in the ERROR showed in popup window
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:
1. Start all services
2. Connect sys user
C:\> sqlplus /NOLOG
SQL> CONNECT SYS/SYS_password AS SYSDBA
3. Enter the following SQL*Plus commands:
SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> SPOOL OFF
Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.
This list provides the version and status of each SERVER component in the database.
If necessary, rerun the catupgrd.sql script after correcting any problems.
4. Restart the database:
5. Compile Invalid Objects
Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
Identifying Invalid Objects
The DBA_OBJECTS view can be used to identify invalid objects using the following query:
COLUMN object_name FORMAT A30
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name;
With this information you can decide which of the following recompilation methods is suitable for you.
The Manual Approach
For small numbers of objects you may decide that a manual recompilation is sufficient. The following example shows the compile syntax for several object types:
ALTER PACKAGE my_package COMPILE;
ALTER PACKAGE my_package COMPILE BODY;
ALTER PROCEDURE my_procedure COMPILE;
ALTER FUNCTION my_function COMPILE;
ALTER TRIGGER my_trigger COMPILE;
ALTER VIEW my_view COMPILE;
Notice that the package body is compiled in the same way as the package specification, with the addition of the word "BODY" at the end of the command.
An alternative approach is to use the DBMS_DDL package to perform the recompilations:
EXEC DBMS_DDL.alter_compile('PACKAGE', 'MY_SCHEMA', 'MY_PACKAGE');
EXEC DBMS_DDL.alter_compile('PACKAGE BODY', 'MY_SCHEMA', 'MY_PACKAGE');
EXEC DBMS_DDL.alter_compile('PROCEDURE', 'MY_SCHEMA', 'MY_PROCEDURE');
EXEC DBMS_DDL.alter_compile('FUNCTION', 'MY_SCHEMA', 'MY_FUNCTION');
EXEC DBMS_DDL.alter_compile('TRIGGER', 'MY_SCHEMA', 'MY_TRIGGER');
This method is limited to PL/SQL objects, so it is not applicable for views.
SQL> select * from v$version;
Oracle Database 10g Release 10.2.0.4.0 - Production
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production