Anda di halaman 1dari 6

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. 2. Requirements 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= C:\>sqlplus /nolog 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 Enter password: Connected. SQL> SHUTDOWN Database closed. Database dismounted. ORACLE instance shut down. 4. Stop all services C:\>set oracle_sid=GoldLink 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.

GOLDLINK

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 recommend 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 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> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sql 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: SQL> SHUTDOWN SQL> STARTUP 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.

SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql SQL> select * from v$version; BANNER ---------------------------------------------------------------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

Step by step oracle database upgrade from 10.2.0.2 to 10.2.0.4 (also for SAP patch as well )
Required Software and Installable are available in */*/Patch directory $HOME = /oracle/SAM $ORACLE_HOME = /oracle/SAM/102_64 1. 10.2.0.4 Patchset (patchset file is already extracted) 2. OPatch version 10.2.0.5.0 3. MOPatch version2.1.7 Note:- All Required Software are kept in $HOME/Patch Directory and extract files in following order 1) Mopatch-2-1-7.zip in $ORACLE_HOME directory Note:- Unzip After 10.2.0.4 patchset installation. 2) OPatch10205_Generic_v0.zip file in $ORACLE_HOME directory Note:- Unzip After 10.2.0.4 patchset installation. 3) Patchset_10204.zip file in current directory i.e. in Patch Path Step 1.-> Check upgradation prerequisites: 1.1 Stop SAP. (No need while applying on BCV) 1.2:- check oratab and orainventory location at /var/opt/oracle and entry of SAM:/oracle/SAM/102_64: N in oratab file, If not make an entry in oratab file. 1.3 :- To check invalid objects and Tablepsace prerequisites Sql> @?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path) Sql> @?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path) Important Note:- After running prerequisites script you seen some public objects are invalid in SYS schema and other schemas(SAPSR3). Here we are only concern about SYS objects. Which is known and need to be compiled. Next step to run utlrp script to get compiled invalid objects. 1.2:- Run utlrp.sql to validate invalid objects. Purpose:- To ensure there is no object invalid found in SYS schema otherwise probabilities patch up gradation failed. Run below scripts Sql>@?/rdbms/admin/utlrp.sql Result:- In most cases result should report 0 in SYS schemas.( invalid objects). IF NOT ABORT OR STOP INSTALLATION PROCESS Again Run Prerequistes script Sql>@?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path) Note:- No Objects are invalid in SYS and SAPSR3 Schemas and DB is Ready for Upgradation. Next step to Shutdown Database and related Components. Step 2:- Shutdown database listener,OEM and all component related to Oracle

2.1 Gracefully stop Database instance and Listener process (Dont use abort or kill Oracle process) 2.2 OEM is not valid when you test in BCV server as this is not configured for same but in Production you have to gracefully stop. Sql>shutdown immediate; Log off from sql prompt Orap22>lsnrctl stop Check the oracle processes by executing command ps ef |grep -i ora_ Check the listener process by executing command ps ef |grep -i LIS Step: 3 Run OPatch 3.1 Run OPatch lsinventory to ensure ora inventory location Orap22>/oracle/SAM/102_64/OPatch/opatch lsinventory Step:-4 start 10.2.0.4 Patch Binary upgradation process. Go to Patch directory in Disk1 directory 1.1 1.2 1.3 Start XBrowser Set Display Env type command export DISPLAY=your Desktop/Laptop IP:0.0 ./oracle/SAM/Patch/Disk1/runInstaller

4.4 Verified ORACLE_HOME Purpose:- To Validate correct ORACLE_HOME where 10.2.0.4 binary is going to update. Workaround:- If not seen correct ORACLE_HOME abort and verify oraInventory location 4.5 Installaler summary 4.6 sh /oracle/SAM/102_64/root.sh from another session as root user a) Go to ORACLE_HOME run command from $ Prompt sh root.sh

Step-5:- Run MOPatch for CPU patches(SBP) 5.1) Unzip Mopatch-2-1-7.zip in $ORACLE_HOME directory from Patch location Orap22>unzip /oracle/SAM/Patch/Mopatch-2-1-7.zip /oracle/SAM/102_64/. 5.2) Unzip OPatch 10205_Generic_v0.zip file in $ORACLE_HOME directory Patch location Orap22>unzip /oracle/SAM/Patch/OPatch10205_Generic_v0.zip /oracle/SAM/102_64/. Note:- Run OPatch version to confirm OPatch version 10.2.0.5.0 which is required to run SAP Supplied Bundle Patch CAUTION:- Before running mopatch ensure OPatch version:10.2.0.5.0 Otherwise MOpatch run but some patch failed which required OUI version 10.2.0.5.0

Verified OPatch lsinventory Purpose:- To Ensure Inventory of Patches which we applied recently. Next Step to Upgrade Database. Orap22>Sh /oracle/SAM/102_64/MOPatch/mopatch.sh v s SAP_102048_201105_SOL64.zip Step6:- Upgrade Database 6.1 startup database in upgrade mode Sql>startup upgrade check oracle version 10.2.0.4 after loggin into sql prompt. 6.2 Run catupgrd.sql Execute SQL from sql command prompt Sql>spool catupgrd.log Sql> @?/rdbms/admin/catupgrd.sql Step 7:- Shutdown Database and restart in normal mode. Sql>shutdown immediate; Sql>startup Step 8:- Run utlrp to validate any invalid object while upgrading Sql> @?/rdbms/admin/utlrp.sql Step:-9 Shutdown and restart database to take new parameter in effects. Step:-10 Start listener and OEM Test and release to user.

END Here i am sharing the steps i follow to patchset Oracle from 10.2.0.2 to 10.2.0.4 and activate Oracle enterprise manager
1) Activate OEM in SAP emca -config dbcontrol db -repos create Then Provide info as it ask emctl start dbconsole then point your browser at http://Srevr_name:5500/em Note :386413 enterprise manager configuration oracle 592393 FAQ: Oracle 355770 Oracle Enterprise Manager Database Control 105047 Support for Oracle functions in the SAP environmt 2) Note 871096 Oracle Database 10g: Patch sets/patches for 10.2.0 Note 839187 Oracle Database 10g: Patch set installation Note 509314 Downloading Oracle patches from SAP Service Marketplace Note 839182 Oracle database 10g: OPatch Note 1137346 Oracle Database 10g: Patches for Release 10.2.0.4

3) Download Patchset From Service Market Place 509314 Downloading Oracle patches from SAP Service Marketplace====IMP Sap Provide Patch in .bin format (Here i waste My full Day) To get the original zip-file back, use the following commmands for: UNIX cat aa.bin ab.bin >> .zip Windows copy aa.bin /B + ab.bin /B + .zip 4) Now run runinstaller for Patchset before that shutdown DB and all services 5) Post Upgrade Steps:Database upgrade from Release 10.2.0.2 -> 10.2.0.4 When you upgrade a database from Oracle Release 10.2.0.2 to 10.2.0.4, you need to adapt the Oracle Dictionary to the new Oracle version during postprocessing. In this case, catupgrd.sql must run in accordance with the defaults described in the patch set documentation. dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName sys sysDBAPassword bandhan6 -recompile_invalid_objects true @/oracle/SID/102_64/rdbms/admin/catupgrd.sql @/oracle/SID/102_64/rdbms/admin/utlrp.sql emca -upgrade db @/oracle/SRP/102_64/rdbms/admin/catupgrd.sql 6) Apply Opatch % opatch version isplaying the OPatch version

Displaying the online help % opatch -help Displaying the online help for a certain command % opatch -help = apply, rollback, lsinventory, util Displaying the Oracle inventory (see below) % opatch lsinventory [-all][-detail] Installing a patch (see below) % opatch apply Uninstalling a patch (see below) % opatch rollback -id

Anda mungkin juga menyukai