Tuesday, June 3, 2008

Critical Patch Update

Example : Below procedure based on our test enviourment if you follow this instruction please go through README.TXT file comes with PATCH SET.Patch Installation Procedures for Oracle Database Release 10.1.0.5Patch Number : p5907304_10105_WINNT.zipSYSTEM Overview
Platforms : Windows XP SP2Database : 10.1.0.5.0OPatch Utility InformationYou 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 SetupC:\>set ORACLE_SID=ORCLC:\>set ORACLE_HOME=c:\oracle\product\10.1.0\db_1C:\>cd c:\oracle\product\10.1.0\db_1\opatchC:\Oracle\product\10.1.0\Db_1\OPatch>opatch lsinventoryOracle Interim Patch Installer version 1.0.0.0.53Note: if Opatch utility version is <= 1.0.0.0.53 then you have to download OPATCH utility from metalink site.[output cut]Oracle Home = c:\oracle\product\10.1.0\db_1Location of Oracle Universal Installer components = C:\oracle\product\10.1.0\db_1\ouiLocation of OraInstaller.jar = "C:\oracle\product\10.1.0\db_1\oui\jlib"Oracle Universal Installer shared library = C:\oracle\product\10.1.0\db_1\oui\lib\win32\oraInstaller.dllLocation of Oracle Inventory Pointer = N/ALocation of Oracle Inventory = C:\oracle\product\10.1.0\db_1\inventoryPath to Java = "C:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\java.exe"Log file = c:\oracle\product\10.1.0\db_1/.patch_storage//*.logCreating log file "C:\oracle\product\10.1.0\db_1\.patch_storage\LsInventory__06-13-2007_20-18-49.log"Result:There is no Interim PatchOPatch succeeded.OPatch returns with error code = 0Preinstallation Instructions1. 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 INVENTORY3. Perform a clean shutdown of all Oracle servicesC:\>net stop OracleServiceORCLThe following services are dependent on the OracleServiceORCL service.Stopping the OracleServiceORCL service will also stop these services.OracleDBConsoleorclDo you want to continue this operation? (Y/N) [N]: YThe OracleDBConsoleorcl service is stopping...............The OracleDBConsoleorcl service was stopped successfully.The OracleServiceORCL service is stopping...........The OracleServiceORCL service was stopped successfully.C:\>net stop OracleServiceCATDBThe OracleServiceCATDB service is stopping......The OracleServiceCATDB service was stopped successfully.C:\>LSNRCTL stopLSNRCTL for 32-bit Windows: Version 10.1.0.5.0 - Production on 13-JUN-2007 20:30:30Copyright (c) 1991, 2004, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))The command completed successfullyC:\>net stop OracleCSServiceThe OracleCSService service was stopped successfully.C:\>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 C:\>set PERL5LIB=C:\oracle\product\10.1.0\db_1\perl\5.6.1\lib;%PERL5LIB%C:\>set PATH=C:\oracle\product\10.1.0\db_1\perl\5.6.1\bin\MSWin32-x86;%PATH%5. set ORACLE_HOME variableC:\>set ORACLE_HOME=c:\oracle\product\10.1.0\db_16. Check if the java and jar executables are present in your Oracle Home-->JAVA = %ORACLE_HOME%\jre\\bin-->JAR = %ORACLE_HOME%\jdk\bin7. Go to directory where download the patchC:\Oracle\product\10.1.0\Db_1\OPatch>opatch apply c:\5907304Post Installation Instructions1. Start All Oracle Services.C:\>net start OracleServiceORCLC:\>net start OracleServiceCATDBC:\>set ORACLE_SID=orclC:\>emctl start dbconsoleC:\>LSNRCTL startC:\>net start OracleCSServiceC:\>net start OracleOraDb10g_home1iSQL*Plus2. 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:C:\>rem go to CPU directoryC:\>CD C:\oracle\product\10.1.0\db_1\CPU\CPUApr2007C:\Oracle\product\10.1.0\Db_1\cpu\cpuapr2007>sqlplus /nologSQL*Plus: Release 10.1.0.5.0 - Production on Thu Jun 14 08:21:34 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> conn sys as sysdbaEnter password:Connected.SQL> select instance_name from v$instance;INSTANCE_NAME----------------orclSQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> STARTUP MIGRATEORACLE instance started.Total System Global Area 356515840 bytesFixed Size 789400 bytesVariable Size 330036328 bytesDatabase Buffers 25165824 bytesRedo Buffers 524288 bytesDatabase mounted.Database opened.SQL> @CATCPU.SQL[OUTPUT CUT]SQL> SHUTDOWN IMMEDIATE;Database closed.Database dismounted.ORACLE instance shut down.SQL> quitIf catcpu.sql reports any Invalid Objects, compile the invalid objects as followsC:\>cd C:\oracle\product\10.1.0\db_1\rdbms\adminC:\Oracle\product\10.1.0\Db_1\RDBMS\ADMIN>sqlplus /nologSQL*Plus: Release 10.1.0.5.0 - Production on Thu Jun 14 08:47:26 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> conn sys as sysdbaEnter password:Connected to an idle instance.SQL> STARTUPORACLE instance started.Total System Global Area 356515840 bytesFixed Size 789400 bytesVariable Size 330036328 bytesDatabase Buffers 25165824 bytesRedo Buffers 524288 bytesDatabase mounted.Database opened.SQL> @utlprp.sql 0SQL> select OBJECT_NAME from dba_objects where status = 'INVALID';no rows selected3. 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 SYSDBASQL> ALTER USER DBSNMP ACCOUNT UNLOCKSQL> PASSWORD DBSNMPChanging password for DBSNMPNew password: new_passwordRetype new password: new_password

No comments: