(
select e.apply_name, e.queue_name, e.queue_owner, e.local_transaction_id,
e.source_database, e.source_transaction_id,
e.source_commit_scn, e.message_number, e.error_number,
e.error_message, e.recipient_id, e.recipient_name, e.message_count,
e.error_creation_time, e.source_commit_position,
e.error_type, e.source_root_name, e.error_position
from dba_apply_error e, all_users u, all_queues q
where e.recipient_id = u.user_id
and q.name = e.queue_name
and q.owner = e.queue_owner
union all
select e.apply_name, e.queue_name, e.queue_owner, e.local_transaction_id,
e.source_database, e.source_transaction_id,
e.source_commit_scn, e.message_number, e.error_number,
e.error_message, e.recipient_id, e.recipient_name, e.message_count,
e.error_creation_time, e.source_commit_position,
e.error_type, e.source_root_name, e.error_position
from dba_apply_error e
where e.recipient_id NOT IN (select user_id from dba_users))
(
SELECT E.APPLY_NAME
, E.QUEUE_NAME
, E.QUEUE_OWNER
, E.LOCAL_TRANSACTION_ID
,
E.SOURCE_DATABASE
, E.SOURCE_TRANSACTION_ID
,
E.SOURCE_COMMIT_SCN
, E.MESSAGE_NUMBER
, E.ERROR_NUMBER
,
E.ERROR_MESSAGE
, E.RECIPIENT_ID
, E.RECIPIENT_NAME
, E.MESSAGE_COUNT
,
E.ERROR_CREATION_TIME
, E.SOURCE_COMMIT_POSITION
,
E.ERROR_TYPE
, E.SOURCE_ROOT_NAME
, E.ERROR_POSITION
FROM DBA_APPLY_ERROR E
, ALL_USERS U
, ALL_QUEUES Q
WHERE E.RECIPIENT_ID = U.USER_ID
AND Q.NAME = E.QUEUE_NAME
AND Q.OWNER = E.QUEUE_OWNER
UNION ALL
SELECT E.APPLY_NAME
, E.QUEUE_NAME
, E.QUEUE_OWNER
, E.LOCAL_TRANSACTION_ID
,
E.SOURCE_DATABASE
, E.SOURCE_TRANSACTION_ID
,
E.SOURCE_COMMIT_SCN
, E.MESSAGE_NUMBER
, E.ERROR_NUMBER
,
E.ERROR_MESSAGE
, E.RECIPIENT_ID
, E.RECIPIENT_NAME
, E.MESSAGE_COUNT
,
E.ERROR_CREATION_TIME
, E.SOURCE_COMMIT_POSITION
,
E.ERROR_TYPE
, E.SOURCE_ROOT_NAME
, E.ERROR_POSITION
FROM DBA_APPLY_ERROR E
WHERE E.RECIPIENT_ID NOT IN (SELECT USER_ID
FROM DBA_USERS))
|
|
|