Sunday, March 20, 2011

AutoPatch error: - ORA-01502 ,ORA-06512 - adphistExecBulkActionPkg: Unexpected Database Error



AutoPatch error:

adphistExecBulkActionPkg: Unexpected Database Error

AutoPatch error:

ORA-01502: index 'APPLSYS.AD_PATCH_RUN_BUG_ACTIONS_U1' or partition of such index is in unusable state
ORA-06512: at "APPS.AD_FILE_UTIL", line 2254
ORA-06512: at line 3

Error calling adphistExecBulkActionPkg().

0 patches uploaded from the ADPSV format patch history files: Sun Mar 13 2011 12:00:12

SELECT * from USER_INDEXES WHERE STATUS = ‘INVALID’; SQL statement.

Solution to this error is simple. You can:

   1. Drop the specified index and/or recreate the index
   2. Rebuild the specified index
   3. Rebuild the unusable index partition

2nd one :

ORA-01502: index 'indexname' or partition of such index is in unusable state

The reason is that some indexes have been marked unusable by a direct load or by a DDL operation, or shrinking space etc. Here is simple solution.


   1. Drop the specified index and/or recreate the index
   2. Rebuild the specified index
   3. Rebuild the unusable index partition

Here we rebuilding UNUSABLE indexes online, quering to USER_INDEXES view.
$sqlplus /nolog

Sql> connect system/oracle
Sql> SELECT count(*),status FROM all_indexes GROUP BY status;
Sql>  select 'alter index '||owner||'.'||index_name||' rebuild online ;' from dba_indexes where status = 'UNUSABLE' ;

Finding Invalid Objects in database. Nice Command



SELECT 'ALTER '|| OBJECT_TYPE || ' '|| OBJECT_NAME || ' COMPILE;'

FROM ALL_OBJECTS WHERE OBJECT_NAME IN (

select d.name

from sys.obj$ d, sys.dependency$ dep, sys.obj$ p

where d.obj# = dep.d_obj# and p.obj# = dep.p_obj#

and d.status = 1

and bitand(dep.property, 1) = 1

and d.subname is null

and not(p.type# = 32 and d.type# = 1)

and not(p.type# = 29 and d.type# = 5)

and not(p.type# in(5, 13) and d.type# in (2, 55))

and (p.status not in (1, 2, 4) or p.stime != dep.p_timestamp));

HP Unix commands related to Memory,Swapspace etc



 Memory utilization on HP-UX

UNIX95= ps -e -o vsz,uid,pid,args |sort -rn |more  

swapinfo -tam

iostat

top

check physical memory of HP-Unix
dmesg -i | grep physical

Finding and Deleting Files in Unix older than the specified number of days



syntax : 

For finding the files older than 35 days

  find . -name "filename.ext" -mtime +no_of_days -exec ls -ltr {} \;
e.g
  find . -name "*req" -mtime +35 -exec ls -ltr {} \;

 Verify the timestamp of all the files.They must be older than 5 weeks

For Deleting files older that 35 days :

find . -name "*req" -mtime +35 -exec rm {} \;

Verify after execution of the above.

Execute:  find . -name "*req" -mtime +35 -exec ls -ltr {} \;