How to get active session ------------
select sid,serial#,module,machine,last_login_time from v$session where status='ACTIVE'
TO FIND OUT LONGOPS SESSION :===
SELECT a.sid, a.serial#, b.username , opname OPERATION, target OBJECT,
TRUNC(elapsed_seconds, 5) "ET (s)", TO_CHAR(start_time, 'HH24:MI:SS') start_time,
ROUND((sofar/totalwork)*100, 2) "COMPLETE (%)"
FROM v$session_longops a, v$session b
WHERE a.sid = b.sid AND b.username not IN ('SYS', 'SYSTEM') AND totalwork > 0
ORDER BY elapsed_seconds;
TO GET INVALID OBJECTS:
select owner,object_name,object_type from dba_objects where status='INVALID'
TO FIND OUT SESSION FROM CONCURRENT REQ ID :
SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID
FROM apps.fnd_concurrent_requests a,
apps.fnd_concurrent_processes b,
v$process c,
v$session d
WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND b.session_id=d.audsid
AND a.request_id in ('27222682','27223376');
TO FIND TABLESPACE AGAINST TABLE :
select table_name,tablespace_name from all_tables where table_name = 'EMP';
select sid,serial#,module,machine,last_login_time from v$session where status='ACTIVE'
TO FIND OUT LONGOPS SESSION :===
SELECT a.sid, a.serial#, b.username , opname OPERATION, target OBJECT,
TRUNC(elapsed_seconds, 5) "ET (s)", TO_CHAR(start_time, 'HH24:MI:SS') start_time,
ROUND((sofar/totalwork)*100, 2) "COMPLETE (%)"
FROM v$session_longops a, v$session b
WHERE a.sid = b.sid AND b.username not IN ('SYS', 'SYSTEM') AND totalwork > 0
ORDER BY elapsed_seconds;
TO GET INVALID OBJECTS:
select owner,object_name,object_type from dba_objects where status='INVALID'
TO FIND OUT SESSION FROM CONCURRENT REQ ID :
SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID
FROM apps.fnd_concurrent_requests a,
apps.fnd_concurrent_processes b,
v$process c,
v$session d
WHERE a.controlling_manager = b.concurrent_process_id
AND c.pid = b.oracle_process_id
AND b.session_id=d.audsid
AND a.request_id in ('27222682','27223376');
TO FIND TABLESPACE AGAINST TABLE :
select table_name,tablespace_name from all_tables where table_name = 'EMP';
No comments:
Post a Comment