Look in:

Web oracle-core-dba.blogspot.com

Friday, December 28, 2007

Installing the April 2007 Critical Patch Update on Windows

This article describes the procedure to install the April 2007 CPU patch on Oracle Database Release 10.1.0.5. The Patch Number is p5907304_10105_WINNT.zip

SYSTEM Overview

Platforms : Windows XP SP2
Database : 10.1.0.5.0

OPatch Utility Information

You must use the OPatch utility release 1.0.0.0.57 or later. You can download it from OracleMetaLink with patch 2617419.

Check Oracle Inventory Setup

D:\>set ORACLE_SID=TEST

D:\>set ORACLE_HOME=D:\oracle\product\10.1.0\db_1

D:\>cd D:\oracle\product\10.1.0\db_1\opatch

D:\oracle\product\10.1.0\Db_1\OPatch>opatch lsinventory

Oracle Interim Patch Installer version 1.0.0.0.53

Note: if Opatch utility version is <= 1.0.0.0.53 then you have to download OPATCH utility from the Metalink site.
[output not attached]

Oracle Home = D:\oracle\product\10.1.0\db_1
Location of Oracle Universal Installer components = D:\oracle\product\10.1.0\db_1\oui
Location of OraInstaller.jar = "D:\oracle\product\10.1.0\db_1\oui\jlib"
Oracle Universal Installer shared library = D:\oracle\product\10.1.0\db_1\oui\lib\win32\oraInstaller.dll
Location of Oracle Inventory Pointer = N/A
Location of Oracle Inventory = D:\oracle\product\10.1.0\db_1\inventory
Path to Java = "D:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\java.exe"
Log file = D:\oracle\product\10.1.0\db_1/.patch_storage//*.log

Creating log file "D:\oracle\product\10.1.0\db_1\.patch_storage\LsInventory__12-13-2007_10-18-45.log"

Result:

There is no Interim Patch

OPatch succeeded.
OPatch returns with error code = 0

Preinstallation Instructions

1. Ensure that your Oracle Database installation is the same release for which you are applying this patch.

2. Back up the current database that is installed
-->ORACLE_HOME or ORA INVENTORY

3. Perform a clean shutdown of all Oracle services

D:\>net stop OracleServiceTEST
The following services are dependent on the OracleServiceTEST service.
Stopping the OracleServiceTEST service will also stop these services.

OracleDBConsoleTEST

Do you want to continue this operation? (Y/N) [N]: Y
The OracleDBConsoleTEST service is stopping...............
The OracleDBConsoleTEST service was stopped successfully.

The OracleServiceTEST service is stopping...........
The OracleServiceTEST service was stopped successfully.

D:\>net stop OracleServiceRCAT
The OracleServiceRCAT service is stopping......
The OracleServiceRCAT service was stopped successfully.


D:\>LSNRCTL stop

LSNRCTL for 32-bit Windows: Version 10.1.0.5.0 - Production on 13-DEC-2007 10:30:50

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
The command completed successfully

D:\>net stop OracleCSService

The OracleCSService service was stopped successfully.


D:\>net stop OracleOraDb10g_home1iSQL*Plus
..
The OracleOraDb10g_home1iSQL*Plus service was stopped successfully.

4. Set the PERL5LIB and PATH environment variables to point to Perl in Oracle Home

D:\>set PERL5LIB=D:\oracle\product\10.1.0\db_1\perl\5.6.1\lib;%PERL5LIB%

D:\>set PATH=D:\oracle\product\10.1.0\db_1\perl\5.6.1\bin\MSWin32-x86;%PATH%


5. set ORACLE_HOME variable

D:\>set ORACLE_HOME=D:\oracle\product\10.1.0\db_1

6. Check if the java and jar executables are present in your Oracle Home

-->JAVA = %ORACLE_HOME%\jre\\bin
-->JAR = %ORACLE_HOME%\jdk\bin

7. Go to directory where you downloaded the patch

D:\oracle\product\10.1.0\Db_1\OPatch>opatch apply D:\5907304

Post Installation Instructions

1. Start All Oracle Services.

D:\>net start OracleServiceTEST

D:\>net start OracleServiceRCAT

D:\>set ORACLE_SID=TEST

D:\>emctl start dbconsole

D:\>LSNRCTL start

D:\>net start OracleCSService

D:\>net start OracleOraDb10g_home1iSQL*Plus

2. For each database instance running out of the ORACLE_HOME being patched, connect to the database using SQL*Plus as SYSDBA and run catcpu.sql as follows:

D:\>rem go to CPU directory

D:\>CD D:\oracle\product\10.1.0\db_1\CPU\CPUApr2007

D:\oracle\product\10.1.0\Db_1\cpu\cpuapr2007>sqlplus /nolog

SQL*Plus: Release 10.1.0.5.0 - Production on Fri Dec 14 14:31:43 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn sys as sysdba
Enter password:
Connected.
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
TEST

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP MIGRATE
ORACLE instance started.

Total System Global Area 1023410176 bytes
Fixed Size 782304 bytes
Variable Size 74190880 bytes
Database Buffers 947912704 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.

SQL> @CATCPU.SQL

[output not attached]

SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit

If catcpu.sql reports any Invalid Objects, compile the invalid objects as follows

D:\>cd D:\oracle\product\10.1.0\db_1\rdbms\admin

D:\oracle\product\10.1.0\Db_1\RDBMS\ADMIN>sqlplus /nolog

SQL*Plus: Release 10.1.0.5.0 - Production on Fri Dec 14 14:55:21 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn sys as sysdba
Enter password:
Connected to an idle instance.
SQL> STARTUP
ORACLE instance started.

Total System Global Area 1023410176 bytes
Fixed Size 782304 bytes
Variable Size 74190880 bytes
Database Buffers 947912704 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.

SQL> @utlprp.sql

SQL> select OBJECT_NAME from dba_objects where status = 'INVALID';

no rows selected

3. If any databases have been created without using DBCA (that is, using the command line), and you need to monitor such a database by using Oracle Enterprise Manager 10g, follow these steps:

$ sqlplus SYS / AS SYSDBA
SQL> ALTER USER DBSNMP ACCOUNT UNLOCK
SQL> PASSWORD DBSNMP
Changing password for DBSNMP
New password: new_password
Retype new password: new_password

No comments: