Skip to main content

Posts

Change Cluster Interconnect & IP Address in 11gR2 RAC

Change Cluster Interconnect Adapter  & IP Address in 11gR2 RAC We can change it at any stage, it require full outage. Step 1: Determine private IP address [oracle@Jayesh1 ~]$ oifcfg getif eth0  192.168.1.0  global  public eth1  10.0.0.0  global  cluster_interconnect Step 2: Determine Ethernet card name [oracle@Jayesh1 ~]$ oifcfg iflist eth0  192.168.1.0 eth1  10.0.0.0 Step 3: Add new interface Subnet ID specification: [oracle@Jayesh1 ~]$ oifcfg setif -global eth1/175.16.0.0:cluster_interconnect Step 4 : Verify the changes: [oracle@Jayesh1 ~]$ oifcfg getif eth0  192.168.1.0  global  public eth1  10.0.0.0  global  cluster_interconnect eth1  175.16.0.0  global  cluster_interconnect Step 5: Stop cluster on all node: [oracle@Jayesh1 ~]# sudo /u01/app/11.2.0/grid/bin/crsctl stop cluster -all Step 6: Modify netwrok address on network adapter of each box: [root@Jayesh1 ~]# ifconfig eth1 175.16.0.10 n...

Oracle Adrci commands

Oracle Adrci commands Alert log trimming to get contents for last 3 days $ adrci exec="set home diag/rdbms/ctip/ctip1; show alert -p \\\"message_text like '%' and originating_timestamp > systimestamp-3\\\"" -term > alert_temp.log $ ls -ltr alert_temp.log -rw-r--r-- 1 oracle dba 403615 Nov  7 21:18 alert_temp.log To Purge Multiple adrci homes in schell script  1) adrci exec="show homes"|grep -v : | while read file_line do echo "INFO: adrci purging diagnostic destination " $file_line echo "INFO: purging ALERT older than 90 days" adrci exec="set homepath $file_line;purge -age 129600 -type ALERT" echo "INFO: purging INCIDENT older than 30 days" adrci exec="set homepath $file_line;purge -age 43200 -type INCIDENT" echo "INFO: purging TRACE older than 30 days" adrci exec="set homepath $file_line;purge -age 43200 -type TRACE" echo "INFO: purging CDUMP older than 30 days"...

Scheduling AWR from OEM | a PL sql Script

Schedule the below report in OEM. it will generate a report for 12 hour and send to your email box. DECLARE    dbid           NUMBER;    inst_id        NUMBER;    bid            NUMBER;    eid            NUMBER;    db_unique_name VARCHAR2(30);      host_name       VARCHAR2(64);    starttime      CHAR (5);    endtime        CHAR (5);    v_from         VARCHAR2 (80);    v_recipient    VARCHAR2 (80) := '----------------------Email _D----------------';    v_mail_host    VARCHAR2 (30...

Extend FS on Lunux boxes with lvextend

df -h . **************************************************************************************************** /dev/mapper/vg0-appgrid_vol                   30G   29G   26M 100% /app/grid **************************************************************************************************** Node1:root:/root # vgs   VG   #PV #LV #SN Attr   VSize   VFree   vg0    1  23   0 wz--n- 279.16g 75.50g **************************************************************************************************** Node1:root:/root # lvextend -L +10G /dev/mapper/vg0-appgrid_vol -r   Extending logical volume appgrid_vol to 40.00 GiB   Logical volume appgrid_vol successfully resized resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/mapper/vg0-appgrid_vol is mounted on /app/grid; on-line resizing required old desc_blocks = 2, ne...

Check space like df -h on Sun HP-UNIX | Script

df -Pk | awk '{  if ( NR == 1 ) { next }  if ( NF == 6 ) { print }  if ( NF == 5 ) { next }  if ( NF == 1 ) {  getline record;  $0 = $0 record  print $0  }  }' | awk ' BEGIN {print "Filesystem                                    Mount Point                 Total GB   Avail GB    Used GB  Used"        print "--------------------------------------------- ------------------------- ---------- ---------- ---------- -----"} END {print ""} /dev/ || /^[0-9a-zA-Z.]*:\// { printf ("%-45.45s %-25s %10.2f %10.2f %10.2f %4.0f%\n",$1,$6,$2/1024/1024,$4/1024/1024,$3/1024/1024,$5) }'

OEM 12 C OEM -- DISKGROUP STATUS

--Jayesh Pande SELECT a.target_name, t.host_name, a.diskgroup, a.redundancy, a.percent_used, a.total_gb, a.free_gb FROM (     SELECT         target_name,         diskgroup,         MAX (DECODE (seq, 7, VALUE)) REDUNDANCY,         round(MAX (DECODE (seq, 4, VALUE))) PERCENT_USED,         MAX (DECODE (seq, 6, ceil(VALUE/1024))) TOTAL_GB,         MAX (DECODE (seq, 3, ceil(VALUE/1024))) FREE_GB         FROM (                 SELECT                     m.target_name,                       m.key_value diskgroup,          ...

12c. Monthly Database Growth from OEM 12c.

SELECT alloc.TARGET_NAME,TO_DATE(TO_CHAR(alloc.timestamp, 'MON RR'), 'MON RR') AS CALENDAR_MONTH,        alloc.tablespace AS TABLESPACE,        round(avg(alloc.avg_size_mb), 2) AS SIZE_MB,        round(avg(used.avg_used_mb), 2) AS USED_MB,        round(avg(alloc.avg_size_mb - used.avg_used_mb), 2) AS FREE_MB,        round(avg((used.avg_used_mb*100)/ decode(alloc.avg_size_mb, 0, 1, alloc.avg_size_mb)), 2) AS USED_PCT,        round(max(alloc.max_size_mb), 2) AS SIZE_MAX_MB,        round(max(used.max_used_mb), 2) AS USED_MAX_MB,        round(max(alloc.avg_size_mb - used.avg_used_mb), 2) AS FREE_MAX_MB,        round(max((used.avg_used_mb*100)/decode(alloc.avg_size_mb, 0, 1, alloc.avg_size_mb)), 2) AS USE...