Posts

Showing posts with the label Oracle Patching

Setting up Optach environment variable

Setting up Optach environment variable : For Korn / Bourne shell: % export PATH=$PATH:$ORACLE_HOME/OPatch For C Shell: % setenv PATH $PATH:$ORACLE_HOME/OPatch

Oracle Which Patch has been applied?

I n the events when you want to know what all patches have been applied to the oracle database, you can just goto oracle_home/opatch and type lsinventory. but you can also do the same by using the below query in the database.  Which Patch has been applied? SET linesize 200 pagesize 200 col action_time FOR a28 col version FOR a10 col comments FOR a35 col action FOR a25 col namespace FOR a12 SELECT * FROM registry$history; ACTION_TIME                  ACTION                    NAMESPACE    VERSION            ID COMMENTS                         BUNDLE_SERIES ---------------------------- ------------------------- ------------ ---------- ---------- ----------------------------------- ------------------------------ 24-AUG-13 12.03.45.119862 PM APPLY             ...

BACKUP ORACLE HOME AND INVENTORY

BACKUP ORACLE HOME AND INVENTORY Oracle Home and Inventory Backup ----------------------------------------- tar -cvf $ORACLE_HOME $ORACLE_HOME/oraInventory | gzip > Backup_Software_Version.tar.gz Note:  tar -cvf <destination_location> <source_location> ORACLE_HOME & ORACLE_CRS_HOME backup’s (for all nodes in RAC) $ tar -zcvf db_1_bak.tar.gz db_1 $ cd /u01/app/oracle/product/11.2 $ ls -al total 353532 drwxr-xr-x  3 oracle oinstall      4096 Sep  6 17:32 . drwxrwxr-x  3 oracle oinstall      4096 Sep 12  2013 .. drwxr-xr-x 80 oracle oinstall      4096 Jun 11 02:03 db_1 -rw-r--r--  1 oracle oinstall 361627648 Sep  6 17:34 db_1_bak.tar.gz Controlfile Backup --------------------- alter database backup controlfile to trace;  show parameter user_dump_dest (go to udump dest and make the note of controlfile trace)

Applying CPU Patch On Primary Database Server Environment

 Applying CPU Patch On Primary Database Server Environment.  Step 1: Incase if you have standby server. Now disable log shipping on the primary database by setting the log_archive_dest_state_2 to disable. As I said earlier, parameter log_archive_dest_2 on my primary database is set to point to the standby database. SQL> alter system set log_archive_dest_state_2=disable; System altered. Step 2: Shutdown the Primary database and stop the listener running on the primary database server.   [oracle@PRIM ~]$ sqlplus sys/"as sysdba" SQL*Plus: Release 11.2.0.2.0 Production Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, DataMining and Real Application Testing options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edit...

Applying CPU Patch in a dataguard (Physical Standby) environment

Here is a brief explanation on how to apply CPU(Critical Patch Update) in a dataguard environment In this demo, I am applying PSU 11.2.0.4.2 on the Primary and standby databases. Standby  Database Name :ORCL_STBY Primary  Database Name : ORCL Primary Server: [oracle@PRIM ~]$ sqlplus sys / oracle@srprim as sysdba SQL * Plus: Release 11.2 . 0.2 . 0 Production on Tue Sep 18 10 : 43 : 50 2012 Copyright (c) 1982 , 2010 , Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2 . 0.2 . 0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, DataMining and Real Application Testing options SQL> select status,instance_name,database_role from v$database,v$instance; STATUS INSTANCE_NAME DATABASE_ROLE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OPEN                ORCL         ...