Pages

Tuesday, November 8, 2011

To Find and Delete bigger size and older files in Linux

--To find out files size more than 5MB
find . -size +5000  -exec ls -ltr {} \; 
-- To **Remove** files size more than 5MB
find . -size +5000k  -exec rm -rf {} \;

--To find out files older than 30days
find . -mtime +30 -exec ls -ltr {} \;
--To find **Remove** files older than 30days
find . -mtime +30  -exec rm -rf {} \; &

CONCURRENT REQUEST MONITORING QUERIES

SQL TO FIND OUT CONCURRENT REQUESTS CURRENTLY RUNNING:
**********************************************
set lines 180
set pages 1000
set verify off
undef spid
column req_id format 99999999999
column OPID format a10
column PPID format a8
column SPID format a8
column ST_CD format a1
column ph_cd format a1
column CNAME format a30
column event format a15
column user_name format a10
column program format a8
column serial# format 999999
column sid format 9999
column username format a8
select a.request_id "REQ_ID",a.oracle_process_id "OPID",a.os_process_id
"PPID",
e.user_concurrent_program_name "CNAME",
f.user_name,a.status_code "ST_CD",a.phase_code "PH_CD", b.username,b.sid,
b.serial#,b.program,g.event,
to_char(a.ACTUAL_START_DATE,'MON-DD-HH-MI-SS') START_DATE,
to_char(a.ACTUAL_COMPLETION_DATE,'MON-DD-HH-MI-SS') COMPL_DATE
from apps.fnd_concurrent_requests a,(select c.username,c.sid,c.serial#,
                        c.program,d.spid from v$session c, v$process d
                        where c.paddr=d.addr) b,
                        apps.fnd_concurrent_programs_tl e,
                        apps.fnd_user f,
                        v$session_wait g
                        where a.oracle_process_id=b.spid
                        and a.concurrent_program_id=e.concurrent_program_id
                        and e.language='US'
                        and a.requested_by=f.user_id
                        and b.sid=g.sid
            and a.status_code='R'
            and a.phase_code='R';

SQL TO FIND CONCURRENT REQUEST SID,OS PROCESS DETAILS BY REQUEST ID
*******************************************************************

select a.argument_text, a.phase_code, a.status_code, a.oracle_process_id "DB_PROCESS", a.OS_PROCESS_ID "MT_PROCESS", f.user_name
from apps.fnd_concurrent_requests a, apps.fnd_user f where request_id='&REQUEST_ID' and a.requested_by=f.user_id;

OR
==

SELECT C.SID, C.SERIAL#, A.PID
FROM   GV$PROCESS A, FND_CONCURRENT_REQUESTS B, GV$SESSION C
WHERE  B.ORACLE_PROCESS_ID = A.SPID
-- AND    B.REQUEST_ID like '%'
AND    B.REQUEST_ID =&x
AND    A.ADDR=C.PADDR;


SQL TO FIND THE CONCURRENT REQUEST TRACE FILE DETAILS (Input Request ID)
*************************************************************************

SELECT 'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name: '||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id|
|'.trc',
--'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running') ||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#, 'Module : '||ses.module
from
fnd_concurrent_requests req,
v$session ses,
v$process proc,
v$parameter dest,
v$parameter dbnm,
fnd_concurrent_programs_vl prog,
fnd_executables execname where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id ;

Tuesday, September 6, 2011

Blocks Corrupted in system09.dbf After Fresh Installation of E-Business Suite R12.1.1

We have identified a block corruption in the 12.1.1 Fresh Installed Instance, This block corruption identified while running RMAN.

RMAN LOG:
=========


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 09/06/2011 19:51:02
ORA-19566: exceeded limit of 0 corrupt blocks for file /u01/db/apps_st/data/system09.dbf


SQL> select * from V$DATABASE_BLOCK_CORRUPTION;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
352 165657 1 0 ALL ZERO
352 165656 1 0 CORRUPT


SQL> select file_name,FILE_ID,TABLESPACE_NAME from dba_data_files where file_id=352;
FILE_NAME FILE_ID TABLESPACE_NAME
------------------------------------------------------------ ---------- ------------------------------
/u01/db/apps_st/data/system09.dbf 352 SYSTEM


DB Verify OUTPUT
================

dbv file=/u01/db/apps_st/data/system09.dbf feedback=1000
DBVERIFY - Verification complete
Total Pages Examined : 192128
Total Pages Processed (Data) : 53193
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 27615
Total Pages Failing (Index): 0
Total Pages Processed (Other): 2081
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 82766
Total Pages Marked Corrupt : 26473
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 3723391595 (1388.3723391595)



The Segments are Free segments - No need to Panic
=====================================

SQL> SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file#
2 , greatest(e.block_id, c.block#) corr_start_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1) corr_end_block#
3 , least(e.block_id+e.blocks-1, c.block#+c.blocks-1)
4 5 - greatest(e.block_id, c.block#) + 1 blocks_corrupted
, null description
6 7 FROM dba_extents e, v$database_block_corruption c
8 WHERE e.file_id = c.file#
9 AND e.block_id <= c.block# + c.blocks - 1
10 AND e.block_id + e.blocks - 1 >= c.block#
11 UNION
12 SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file#
13 , header_block corr_start_block#
14 , header_block corr_end_block#
15 , 1 blocks_corrupted
16 , 'Segment Header' description
17 FROM dba_segments s, v$database_block_corruption c
18 WHERE s.header_file = c.file#
19 AND s.header_block between c.block# and c.block# + c.blocks - 1
20 UNION
21 SELECT null owner, null segment_type, null segment_name, null partition_name, c.file#
22 , greatest(f.block_id, c.block#) corr_start_block#
23 , least(f.block_id+f.blocks-1, c.block#+c.blocks-1) corr_end_block#
24 , least(f.block_id+f.blocks-1, c.block#+c.blocks-1)
25 - greatest(f.block_id, c.block#) + 1 blocks_corrupted
, 'Free Block' description
26 27 FROM dba_free_space f, v$database_block_corruption c
28 WHERE f.file_id = c.file#
29 AND f.block_id <= c.block# + c.blocks - 1
AND f.block_id + f.blocks - 1 >= c.block#
30 31 order by file#, corr_start_block#;



OWNER SEGME SEGME PARTITION_NA FILE# CORR_START_BLOCK# CORR_END_BLOCK# BLOCKS_CORRUPTED DESCRIPTION
---------- ----- ----- ------------ ---------- ----------------- --------------- ---------------- --------------
352 165656 165656 1 Free Block
352 165657 165657 1 Free Block


SOLUTION TO FIX THE ISSUE
==========================


This is known issue in R12.1.1, The installation media of R12 has block corruption in it.

Ref NoteID: ID 840963.1

Have performed below actions to fix it.

SQL> select sum(bytes/1024/1024),sum(maxbytes/1024/1024) from dba_data_files where FILE_NAME like '%system09.dbf';
SUM(BYTES/1024/1024) SUM(MAXBYTES/1024/1024)
-------------------- -----------------------
                1501                       0


SQL>alter database datafile '/u01/db/apps_st/data/system09.dbf' resize 1000M;

Check for Corruption Now: NONE :)


$dbv file=/u01/db/apps_st/data/system09.dbf feedback=1000
DBVERIFY: Release 11.1.0.7.0 - Production on Wed Sep 7 08:41:53 2011
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/db/apps_st/data/system09.dbf
................................................................................
................................................

DBVERIFY - Verification complete
Total Pages Examined         : 128000
Total Pages Processed (Data) : 53193
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 27615
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 2081
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 45111
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 3723488883 (1388.3723488883)

Sunday, September 4, 2011

Unable To View workflow Status Diagram


In a fresh R12 installed instance, When clicked on the Status diagram following message appears "You have encountered an unexpected error. Please contact the System Administrator for assistance."

When pressed on the click Here link the below error message displays:
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException ( and it displays lot of lines with the exception message)

Solution:

Set the profile option Server Timezone at Site level (should be set to the value of database timezone) and Bounce the Apache Server

Function not available to this responsibility. Change Responsibilities or contact your System Administrator

Function not available to this responsibility. Change Responsibilities or contact your System Administrator


In R12 after setting up New CUSTOM TOP, When you try to access Forms we are hitting "Function not available to this responsibility. Change Responsibilities or contact your System Administrator"

Even after defining the CUSTOM_TOP properly and defining the TOP in application env, this error would occur.

Solution:

1)In R12 go to $INST_TOP/ora/10.1.2/forms/server
2)Make sure your CUSTOM_TOP is defined in  default.env
Example:
Add the entrey as below  in the default.env
XXXYZ=/u01/oracle/EBSR12/apps/apps_st/appl/xxxyz/12.0.0


3)Bounce adopmnctl.sh stopall & Startall
4)Re-test the issue.