select trunc(COMPLETION_TIME,'HH') Hour,thread# , round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives from v$archived_log
group by trunc(COMPLETION_TIME,'HH'),thread# order by 1;
archive_daily
select trunc(COMPLETION_TIME,'DD') Day, thread#, round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives_Generated from v$archived_log group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;
Active_Users_count
select count(distinct d.user_name) from apps.fnd_logins a, v$session b, v$process c, apps.fnd_user d
where b.paddr = c.addr and a.pid=c.pid and a.spid = b.process and d.user_id = a.user_id
and (d.user_name = 'USER_NAME' OR 1=1);
active_inactive_session
select
s.status,
count(1),
s.username
from
v$process p,
v$session s
where
paddr(+)=addr
group by
s.status,
s.username
order by 1;
group by trunc(COMPLETION_TIME,'HH'),thread# order by 1;
archive_daily
select trunc(COMPLETION_TIME,'DD') Day, thread#, round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives_Generated from v$archived_log group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;
Active_Users_count
select count(distinct d.user_name) from apps.fnd_logins a, v$session b, v$process c, apps.fnd_user d
where b.paddr = c.addr and a.pid=c.pid and a.spid = b.process and d.user_id = a.user_id
and (d.user_name = 'USER_NAME' OR 1=1);
active_inactive_session
select
s.status,
count(1),
s.username
from
v$process p,
v$session s
where
paddr(+)=addr
group by
s.status,
s.username
order by 1;
No comments:
Post a Comment