Tuesday, June 26, 2012

BOUNCE APACHE AND CLEAR CACHE ON R-12

1. Stop Apache

2. Clear cache

$ cd $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/
$ ls
application-deployments  config  persistence  tldcache
$ cd persistence
$ ls
oacore_default_group_1  oacore_default_group_2
$ cd ..
$ ls
application-deployments  config  persistence  tldcache
bash-3.00$ mv persistence persistence.1
bash-3.00$ mkdir -m 755 persistence

3. Start Apache

Script to find who has changed the sysadmin Password

The below script helps us to find the user_name who has changed the sysadmin password

SELECT substr(d.user_name,1,30) || '~'||substr(f.user_name,1,10)||'~'||substr(d.last_update_date,1,10) key,count(*) value
from apps.fnd_user d, apps.fnd_user f
WHERE
trunc(d.last_update_date) = trunc(sysdate)
and d.user_name='SYSADMIN'
and d.last_updated_by=f.user_id GROUP BY substr(d.user_name,1,30) || '~'||
substr(f.user_name,1,10)||'~'||substr(d.last_update_date,1,10);

To check the Size of RAM in Unix

HP-UX

swapinfo -tm
Linux

free -m
free -g

AIX

lsdev -C|grep mem

Solaris

prtconf|grep -i mem

Number of times gather schema stats was run in last 30 days

set pages 1000
set line 132
set head on
select  r.request_id,r.actual_start_date,r.phase_code,r.status_code,r.actual_completion_date,argument_text from
apps.fnd_concurrent_programs_vl p, apps.fnd_concurrent_requests r
where p.concurrent_program_id = r.concurrent_program_id
and p.application_id = r.program_application_id
and p.user_concurrent_program_name like '%Gather Schema Statistics%'
and  r.actual_start_date >= sysdate-30 order by r.requested_start_date;

Script to disable all scheduled requests - After cloning

update fnd_concurrent_requests
set phase_code='C',
status_code='D'
where phase_code = 'P'
and (status_code = 'I' OR status_code = 'Q');
and requested_start_date >= SYSDATE
and hold_flag = 'N';