You are on page 1of 8

GOOD MORNING ….

Oracle Apps DBA

1. Daily Tasks
a. Check the mails
b. Check the issues/tickets systems like Remedy
c. Check the alert logs
d. Check the backup status
e. Check the database processes
ps –fu oracle
f. Check the status of the listener
ps –ef|grep tns
g. Check the status of the Application Services
ps –fu applmgr
h. Check the status of Apache
i. Monitor the concurrent manager
Ps –ef |grep FNDLIBR
j. Check the status of the report server
ps -ef | grep rwmts60
You should get output like
applmgr ....... rwmts60 name=REP60_VISION

k. Check the status of the forms server


ps -ef | grep f60webmx

l. Check the status of the scheduled jobs both at the database side and applications side
m. Check the locks
n. Verify all the instances are up and running
o. Check the rollback segment status
p. Check the space availability in /tmp directory from OS
q. Clean the log files
i. user dump
ii. background dump
iii. core dump
iv. Apache $APACHE_TOP/Apache/log and Jserv logs $APACHE_TOP/Jserv/etc
files
v. Net8 logs
vi. Ad utility logs

r. Review Oracle Metalink for status of open SRs


s. Document all modifications and tasks completed
t. Read necessary documents needed for the dba/apps dba

u.
2. Weekly Tasks
a. very scheduled scripts are completing normally
b. check the objects break the rules, naming conventions, check for fragmentations and
row-chaining
c. verify the remote-access tools are in synchronize
d. verify the patch level differences with production
e. monitor user group for relevant topics
3. Monthly Tasks
DBA:
a. growth trends
b. Performance and Tuning
c. Patches
i. Review available database patches, particularly those are related to database bugs

d. User maintenance
i. password maintenance as per the local security policy guidelines
ii. Oracle Apps Password maintenance as per local security policies

e. Predict future
i. CPU and RAM Usage
ii. Network performance
iii. Database space utilization
iv. Archives and Backup
v.

Apps DBA:

a. troubleshooting concurrent managers


i. Adjust the number of target processes
ii. Create the special concurrent requests for the specific tasks
iii. Create special concurrent managers for specific tasks
b. patches
c. growth rate of tables/indexes
d. Performance tuning
i. look for I/O Contention
ii. watch poor performance by fragmentation
iii. Resolve the issues as needed
iv.

4. Yearly Tasks
5.
Daily Monitoring Scripts which are handy

1. Free space  to check the free space available in tablespaces

SELECT tablespace_name, sum ( blocks ) as free_blk , trunc ( sum


( bytes ) /
(1024*1024) ) as free_m
, max ( bytes ) / (1024) as big_chunk_k, count (*) as num_chunks
FROM dba_free_space
GROUP BY tablespace_name
2. Check the free and allocated space in tablespaces

SELECT tablespace_name, largest_free_chunk


, nr_free_chunks, sum_alloc_blocks, sum_free_blocks
, to_char(100*sum_free_blocks/sum_alloc_blocks, '09.99') || '%'
AS pct_free
FROM ( SELECT tablespace_name
, sum(blocks) AS sum_alloc_blocks
FROM dba_data_files
GROUP BY tablespace_name
)
, ( SELECT tablespace_name AS fs_ts_name
, max(blocks) AS largest_free_chunk
, count(blocks) AS nr_free_chunks
, sum(blocks) AS sum_free_blocks
FROM dba_free_space
GROUP BY tablespace_name )
WHERE tablespace_name = fs_ts_name
3. To find the extents reaching the max extents

SELECT e.owner, e.segment_type , e.segment_name , count(*) as


nr_extents ,
s.max_extents
, to_char ( sum ( e.bytes ) / ( 1024 * 1024 ) , '999,999.90') as MB
FROM dba_extents e , dba_segments s
WHERE e.segment_name = s.segment_name
GROUP BY e.owner, e.segment_type , e.segment_name , s.max_extents
HAVING count(*) > &THRESHOLD
OR ( ( s.max_extents - count(*) ) < &&THRESHOLD )
ORDER BY count(*) desc

4. To find the next extents which are not matching the existing

SELECT segment_name, segment_type, ds.next_extent as Actual_Next


, dt.tablespace_name, dt.next_extent as Default_Next
FROM dba_tablespaces dt, dba_segments ds
WHERE dt.tablespace_name = ds.tablespace_name
AND dt.next_extent !=ds.next_extent
AND ds.owner = UPPER ( '&OWNER' )
ORDER BY tablespace_name, segment_type, segment_name
5. To find the existing extents

SELECT segment_name, segment_type


, count(*) as nr_exts
, sum ( DECODE ( dx.bytes,dt.next_extent,0,1) ) as nr_illsized_exts
, dt.tablespace_name, dt.next_extent as dflt_ext_size
FROM dba_tablespaces dt, dba_extents dx
WHERE dt.tablespace_name = dx.tablespace_name
AND dx.owner = '&OWNER'
GROUP BY segment_name, segment_type, dt.tablespace_name,
dt.next_extent
6. Rebuild the indexes to have correct storage parameters

SELECT 'alter index ' || index_name || ' rebuild '


, 'tablespace INDEXES storage '
|| ' ( initial 256 K next 256 K pctincrease 0 ) ; '
16
FROM all_indexes
WHERE ( tablespace_name != 'INDEXES'
OR next_extent != ( 256 * 1024 )
)
AND owner = '&OWNER'
7. Locks held in the database and the programs waiting for the locks

select /*+ORDERED */
w.sid, substr(wp.program,1,20) waiting_program,
vl.sid, substr(hp.program,1,20) holding_program,
vl.ctime, vl.type, vl.lmode, w.request
from v$lock vl, v$lock w,v$session wp,v$session hp
where vl.id1 = w.id1
and h.id2 = w.id2
and vl.block != 0
and w.request != 0
and vl.lmode != 0
and w.sid = wp.sid
and vl.sid = hp.sid
order by ctime;

8. Sessions Holding Locks and Sessions Waiting For Locks

select /*+ORDERED */
w.waiting_session, substr(wp.program,1,20) waiting_program, w.holding_session,
substr(hp.program,1,20) holding_program, l.ctime, l.type, w.mode_held,
w.mode_requested
from v$lock l, dba_waiters w,v$session wp,v$session hp
where w.waiting_session = l.sid
and l.request != 0
and w.waiting_session = wp.sid
and w.holding_session = hp.sid
order by ctime;

9. List wait statistics for the SID

select event, total_waits, total_timeouts, time_waited, average_wait, max_wait


from v$session_event
where sid = &sid;

10. Tablespace Usage

select tsu.tablespace_name, ceil(tsu.used_mb) "size MB"


,decode(ceil(tsf.free_mb), NULL,0,ceil(tsf.free_mb)) "free MB"
,decode(100 - ceil(tsf.free_mb/tsu.used_mb*100), NULL, 100,
100 - ceil(tsf.free_mb/tsu.used_mb*100)) "% used"
from (select tablespace_name, sum(bytes)/1024/1024 used_mb
from dba_data_files group by tablespace_name union all
select tablespace_name || ' **TEMP**'
,sum(bytes)/1024/1024 used_mb
from dba_temp_files group by tablespace_name) tsu
,(select tablespace_name, sum(bytes)/1024/1024 free_mb
from dba_free_space group by tablespace_name) tsf
where tsu.tablespace_name = tsf.tablespace_name (+)
order by 4

11. Concurrent Requests


a. Find the concurrent reuqests which are scheduled
select distinct fcp.user_concurrent_program_name
concurrent_program_name,fcr.concurrent_program_id,fcr.argument1,
fcr.argument_text,
REQUESTED_START_DATE,
RESUBMIT_INTERVAL,
RESUBMIT_INTERVAL_UNIT_CODE
From apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs_tl fcp
where fcr.resubmit_interval IS NOT NULL
AND fcp.concurrent_program_id = fcr.concurrent_program_id
--and fcp.concurrent_program_id = 48348
and STATUS_CODE ='I'
AND fcp.user_concurrent_program_name like 'XXISS Pack Slip Report%'
and REQUESTED_START_DATE > sysdate;
b. Query to find the Concurrent Programs manager wise
SELECT request_id, phase_code, status_code, user_name,
user_concurrent_queue_name
FROM apps.fnd_concurrent_worker_requests cwr,
apps.fnd_concurrent_queues_tl cq,
apps.fnd_user fu
WHERE (cwr.phase_code = 'P' OR cwr.phase_code = 'R')
AND cwr.hold_flag != 'Y'
AND cwr.requested_start_date <= SYSDATE
AND cwr.concurrent_queue_id = cq.concurrent_queue_id
AND cwr.queue_application_id = cq.application_id
AND cq.LANGUAGE = 'US'
AND cwr.requested_by = fu.user_id
ORDER BY 5

c. Query to find which manager is executing which prog

SELECT user_concurrent_program_name, user_concurrent_queue_name


FROM apps.fnd_concurrent_programs_tl cp,
apps.fnd_concurrent_queue_content cqc,
apps.fnd_concurrent_queues_tl cq
WHERE cqc.type_application_id(+) = cp.application_id
AND cqc.type_id(+) = cp.concurrent_program_id
AND cqc.type_code(+) = 'P'
AND cqc.include_flag(+) = 'I'
AND cp.LANGUAGE = 'US'
AND cp.user_concurrent_program_name =
'&USER_CONCURRENT_PROGRAM_NAME'
AND NVL (cqc.concurrent_queue_id, 0) = cq.concurrent_queue_id
AND NVL (cqc.queue_application_id, 0) = cq.application_id
AND cq.LANGUAGE = 'US'

d. Query to find all the concurrent requests which are scheduled Daily/weekly/Monthly

SELECT cr.request_id,
DECODE (cp.user_concurrent_program_name,
'Report Set', 'Report Set:' || cr.description,
cp.user_concurrent_program_name
) NAME,
argument_text, cr.resubmit_interval,
NVL2 (cr.resubmit_interval,
'PERIODICALLY',
NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE')
) schedule_type,
DECODE (NVL2 (cr.resubmit_interval,
'PERIODICALLY',
NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE')
),
'PERIODICALLY', 'EVERY '
|| cr.resubmit_interval
|| ' '
|| cr.resubmit_interval_unit_code
|| ' FROM '
|| cr.resubmit_interval_type_code
|| ' OF PREV RUN',
'ONCE', 'AT :'
|| TO_CHAR (cr.requested_start_date, 'DD-MON-RR HH24:MI'),
'EVERY: ' || fcr.class_info
) schedule,
fu.user_name, requested_start_date
FROM apps.fnd_concurrent_programs_tl cp,
apps.fnd_concurrent_requests cr,
apps.fnd_user fu,
apps.fnd_conc_release_classes fcr
WHERE cp.application_id = cr.program_application_id
AND cp.concurrent_program_id = cr.concurrent_program_id
AND cr.requested_by = fu.user_id
AND cr.phase_code = 'P'
AND cr.requested_start_date > SYSDATE
AND cp.LANGUAGE = 'US'
AND fcr.release_class_id(+) = cr.release_class_id
AND fcr.application_id(+) = cr.release_class_app_id

12. Some useful RAC Commands which are handy

i. Start/Stop crs

crsctl start crs


crsctl stop crs
crsctl status crs

ii. Check the status of services


crs_stat -t
iii. Start/Stop the nodeapps
srvctl start nodeapps -n <node name>
srvctl stop nodeapps -n <node name>

iv. Start/Stop ASM

srvctl start asm -n <node name>


srvctl stop asm -n <node name>
v. Start/Stop database on all nodes
srvctl start database -d <database name>
srvctl stop database -d <database name>

vi. Start/Stop an individual instance


srvctl start instance -d <database name> -i <instance
name>
srvctl stop instance -d <database name> -i <instance name>
vii. Check the VIP Configuration

srvctl config nodeapps -n <node> -a -g -s -l

viii. Locate the VOTING DISK

crsctl query css votedisk

ix. Retrieve OCR information

Ocrcheck

x. Prevent database start at boot time

srvctl disable database -d <database name>

xi. Change VIP address, Subnet mask/Interface


srvctl stop nodeapps -n <node1>
srvctl stop nodeapps -n <node2>
srvctl modify nodeapps -n <node1> -A <ip_address>/
<net mask>/<interface>
srvctl modify nodeapps -n <node2> -A <ip_address>/
<net mask>/<interface>
srvctl start nodeapps -n <node1>
srvctl start nodeapps -n <node2>

You might also like