select xs.server_name,
case
when (nvl(am.spill_lwm_position, '00') <
nvl(am.lwm_external_pos, '00'))
then am.lwm_external_pos
else am.spill_lwm_position
end,
am.lwm_external_pos, am.applied_high_position,
am.spill_lwm_position, am.oldest_position,
am.oldest_scn, am.commit_scn,
am.apply_time, am.applied_message_create_time,
am.spill_lwm_scn, am.source_db_name, am.source_root_name
from sys.xstream$_server xs, streams$_apply_process ap,
"_DBA_APPLY_MILESTONE" am
where ap.apply# = am.apply#
and ap.apply_name = xs.server_name
and bitand(ap.flags, 512) = 512 /* Xstream In */
and bitand(xs.flags, 2) = 2 /* XStream In process */
SELECT XS.SERVER_NAME
,
CASE
WHEN (NVL(AM.SPILL_LWM_POSITION
, '00') <
NVL(AM.LWM_EXTERNAL_POS
, '00'))
THEN AM.LWM_EXTERNAL_POS
ELSE AM.SPILL_LWM_POSITION
END
,
AM.LWM_EXTERNAL_POS
, AM.APPLIED_HIGH_POSITION
,
AM.SPILL_LWM_POSITION
, AM.OLDEST_POSITION
,
AM.OLDEST_SCN
, AM.COMMIT_SCN
,
AM.APPLY_TIME
, AM.APPLIED_MESSAGE_CREATE_TIME
,
AM.SPILL_LWM_SCN
, AM.SOURCE_DB_NAME
, AM.SOURCE_ROOT_NAME
FROM SYS.XSTREAM$_SERVER XS
, STREAMS$_APPLY_PROCESS AP
,
"_DBA_APPLY_MILESTONE" AM
WHERE AP.APPLY# = AM.APPLY#
AND AP.APPLY_NAME = XS.SERVER_NAME
AND BITAND(AP.FLAGS
, 512) = 512 /* XSTREAM IN */
AND BITAND(XS.FLAGS
, 2) = 2 /* XSTREAM IN PROCESS */
|
|
|