Thursday, March 15, 2012

How to apply psu patch on GI HOME using auto option?

[root@vm14 psu]# export PATH=/u01/app/11.2.0/grid/OPatch/:$PATH
[root@vm14 psu]# export GRID_HOME=/u01/app/11.2.0/grid
[root@vm14 psu]# opatch version

OPatch Version: 11.2.0.1.9

OPatch succeeded.
[root@vm14 oracle]# opatch auto /home/oracle/psu -oh /u01/app/11.2.0/grid

Executing /usr/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /home/oracle -patchn psu -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2012-02-29_09-38-06.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
Successfully unlock /u01/app/11.2.0/grid

patch /home/oracle/psu/13653086 apply successful for home /u01/app/11.2.0/grid
patch /home/oracle/psu/13343424 apply successful for home /u01/app/11.2.0/grid
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.

Golden Gate Commands : Part3

Syntax:

GGSCI (test1.domain.com) 77> help STATUS EXTRACT


Use STATUS EXTRACT to determine whether or not Extract is running.

Syntax:
STATUS EXTRACT
[, TASKS]
[, ALLPROCESSES]


The name of an Extract group or a wildcard (*) to specify multiple
groups. For example, T* returns status for all Extract groups
whose names start with T.

TASKS
Displays status only for Extract tasks. By default, tasks are not
displayed unless you specify a single Extract group (without
wildcards).

ALLPROCESSES
Displays status for all Extract groups, including tasks.

Example 1: STATUS EXTRACT finance
Example 2: STATUS EXTRACT fin*




GGSCI (test1.domain.com) 69> STATUS MANAGER

Manager is running (IP port test1.domain.com.7809).


GGSCI (test1.domain.com) 70> STATUS EXTRACT ext3
EXTRACT EXT3: RUNNING


GGSCI (test1.domain.com) 71> STATUS EXTRACT ext3,tasks


GGSCI (test1.domain.com) 72> STATUS EXTRACT ext3,allprocesses
EXTRACT EXT3: RUNNING


GGSCI (test1.domain.com) 73> STATUS EXTRACT ext*,tasks


GGSCI (test1.domain.com) 74> STATUS EXTRACT ext*,allprocesses
EXTRACT EXT1: STOPPED
EXTRACT EXT2: STOPPED
EXTRACT EXT3: RUNNING


****************************************************************************

GGSCI (test1.domain.com) 79> help STATUS REPLICAT


Use STATUS REPLICAT to determine whether or not Replicat is running.

Syntax:
STATUS REPLICAT
[, TASKS]
[, ALLPROCESSES]


The name of a Replicat group or a wildcard (*) to specify multiple
groups. For example, T* returns status for all Replicat groups
whose names start with T.

TASKS
Displays status only for Replicat tasks. By default, tasks are not
displayed unless you specify a single Replicat group (without
wildcards).

ALLPROCESSES
Displays status for all Replicat groups, including tasks.

Example 1: STATUS REPLICAT finance
Example 2: STATUS REPLICAT fin*

Goldden Gate Commands :Part 2

Syntax:
*********************************************************************************
SEND MANAGER [CHILDSTATUS [DEBUG]] [GETPORTINFO [DETAIL]] [GETPURGEOLDEXTRACTS]
*********************************************************************************

GGSCI (test1.domain.com) 61> send manager childstatus

Sending CHILDSTATUS request to MANAGER ...

Child Process Status - 1 Entries

ID Group Process Retry Retry Time Start Time
---- -------- ---------- ----- ------------------ -----------
0 EXT3 7819 0 None 2012/03/03 18:26:55



GGSCI (test1.domain.com) 62> send manager childstatus debug

Sending CHILDSTATUS, request to MANAGER ...

Child Process Status - 1 Entries

ID Group Process Retry Retry Time Start Time Port
---- -------- ---------- ----- ------------------ ----------- ----
0 EXT3 7819 0 None 2012/03/03 18:26:55 7840



GGSCI (test1.domain.com) 63> send manager getportinfo

Sending GETPORTINFO request to MANAGER ...

No Dynamic Ports In Use or Configured


GGSCI (test1.domain.com) 64> send manager getportinfo detail

Sending GETPORTINFO, request to MANAGER ...

No Dynamic Ports In Use or Configured


GGSCI (test1.domain.com) 65> send manager getpurgeoldextracts

Sending GETPURGEOLDEXTRACTS request to MANAGER ...

PurgeOldExtracts Rules
Fileset MinHours MaxHours MinFiles MaxFiles UseCP
/home/oracle/gg/dirdat/t* 48 0 0 0 Y
OK
No extract trails



GGSCI (test1.domain.com) 66>

Golden Gate Commands : Part1

GGSCI (test1.domain.com) 32> info mgr
Manager is running (IP port test1.domain.com.7809).
GGSCI (test1.domain.com) 34> INFO marker
GGSCI (test1.domain.com) 35> info extract ext3
GGSCI (test1.domain.com) 36> info extract ext3,detail
GGSCI (test1.domain.com) 37> VIEW GGSEVT
*************************************************************************************
VIEW REPORT {group_name[n] | file_name}
GGSCI (test1.domain.com) 44> view report ext3/view report rep3
GGSCI (test1.domain.com) 45> lag extract ext3 --Sending GETLAG request to EXTRACT EXT3
GGSCI (test1.domain.com) 48> dumpddl show
GGSCI (test1.domain.com) 48> history
GGSCI (test1.domain.com) 50> history 5
GGSCI (test1.domain.com) 51> VERSIONS
Operating System:
Linux
Version #1 Wed Jan 5 19:22:18 EST 2005, Release 2.6.9-5.EL
Node: test1.domain.com
Machine: i686

Database:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

**********************************************************************

GGSCI (test1.domain.com) 52> fc
GGSCI (test1.domain.com) 52> VERSIONS
GGSCI (test1.domain.com) 52..
GGSCI (test1.domain.com) 53> fc 9
GGSCI (test1.domain.com) 53> info all
GGSCI (test1.domain.com) 53..
GGSCI (test1.domain.com) 57> shell ls -lrt /home/oracle/gg
GGSCI (test1.domain.com) 58> obey /home/oracle/golden.txt --run command from external file
GGSCI (test1.domain.com) 59> info all
GGSCI (test1.domain.com) 60> view report ext3
[oracle@test1 ~]$ cat golden.txt
info all
view report ext3

Thursday, March 1, 2012

Install ASM lib on Linux 5

[root@vm14 ~]# rpm -Uvh oracleasm-support-2.1.7-1.el5.i386.rpm
warning: oracleasm-support-2.1.7-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@vm14 ~]# rpm -Uvh oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686
error: open of oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686 failed: No such file or directory
[root@vm14 ~]# rpm -Uvh oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686*
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-8.el5x########################################### [100%]
[root@vm14 ~]# rpm -Uvh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@vm14 ~]#

Scripts

Check Fragmented Space:

select owner,table_name,blocks,num_rows,avg_row_len,round(((blocks*8/1024)),2)||'MB' "TOTAL_SIZE", round((num_rows*avg_row_len/1024/1024),2)||'Mb' "ACTUAL_SIZE", round(((blocks*8/1024)-(num_rows*avg_row_len/1024/1024)),2) ||'MB' "FRAGMENTED_SPACE" from dba_tables where owner='SCOTT';