Monday, January 18, 2016

ASM Disk Header Issue.. correct it using Kfed repair utility

when you see below error in the ASM ... this means the header of the ASM raw disk got corrupted or
at this time you can still mount....
we had  this issue even everything use to be up and working normal with no issues... but when tried to check the status of the disks it use to complain....so wanted to correct it before something goes wrong.... this issue might be happened due to a reboot or something happens when ASM lost its Header blocks...

do following checks... and confirm...

ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DAT" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DAT"



SQL> select group_number,name,type,state from v$asm_diskgroup;

GROUP_NUMBER NAME                           TYPE   STATE
------------ ------------------------------ ------ -----------
           1 oracle1212_12                  EXTERN 
           2 oracle12_12                    EXTERN MOUNTED
           3 oracle12IR_12                  EXTERN MOUNTED


set lines 250
set pages 40
col path format a30
col hstat format a25
col diname format a40
col dgname format a30
SQL> select di.name diname, dg.name dgname, di.header_status hstat, path from v$asm_disk di, v$asm_diskgroup dg where di.group_number = dg.group_number(+)
order by di.name;  2

DINAME                       DGNAME            HSTAT                PATH
--------------------      ----------------  ---------------    --------------------------
oracle1212_12_0000         oracle_12LOGS                      /oracle/raw2
oracle12_12_0001           oracle12a_12       MEMBER          /oracle/raw29
oracle1212_12_0002         oracleR_12         MEMBER          /oracle/raw30


$:/home> $ORACLE_HOME/bin/kfod status=TRUE asm_diskstring='/oracle/raw*' disk=all dscvgroup = true;
--------------------------------------------------------------------------------
 Disk          Size Header           Path                  Disk Group    User     Group
================================================================================   
   1:     104568 Mb Provisioned   /oracle/raw2            oracle_12LOGS  oracle   dba
   2:     104568 Mb MEMBER        /oracle/raw29           oracle12a_12   oracle   dba
   3:     104568 Mb MEMBER        /oracle/raw30           oracleR_12     oracle   dba


now i know which asm disk header got corrupted..... now i will run the KFED repair operation to correct the header blocks...


$> kfed repair /oracle/raw2 

once this is done.... try to mount the ASM disk

SQL>alter diskgroup oracle_12LOGS;

this will mount the disk... now startup the instance and check.


Thank you.....



How to Get DDL of the Procedure or any object in oracle

use below sql to get the DDL of a specific object:

set long 32000
set long 90000
set heading off;
set echo off;
set pages 1000;
SQL> spool object_name.sql

SQL> select dbms_metadata.get_ddl('object_type','object_name','Owner of the object') from dual;
SQL> spool off

Thanks...

ICMP host xx.y.xxx.xyz unreachable - admin prohibited, length 68 (linux)

run tcp dump on the server that is having an issue....  run below command and try to connect from other servers and see....


> tcpdump -r ensXXX -n host xx.y.xxx.xyz and  not port ssh and not port domain


if you see this below message then

error:- ICMP host xx.y.xxx.xyz unreachable - admin prohibited, length 68 (linux).

solution:-

. make sure firewall rules are setup between the servers you want to listen...
. make sure the firewalld process is shutoff or enable it with the ports that  you want to listen on.. and try again....

PostgreSql: Useful Commands-

 1)   ************************* Users ***************************  -- List of users with roles assigned: SELECT usename AS role_name,   CASE...