rem -----------------------------------------------------------------------
rem Filename:   repmon.sql
rem Purpose:    Monitor replication status, sites and groups
rem Date:       03-Oct-2000
rem Author:     Frank Naude, Oracle FAQ
rem -----------------------------------------------------------------------

connect repadmin/repadmin

set pages 50000

col sname     format a20 head "SchemaName"
col masterdef format a10 head "MasterDef?"
col oname     format a20 head "ObjectName"
col gname     format a20 head "GroupName"
col object    format a35 trunc
col dblink    format a35 head "DBLink"
col message   format a25
col broken    format a6  head "Broken?"

prompt Replication schemas/ sites
select sname, masterdef, dblink
from   sys.dba_repschema;

prompt RepCat Log (after a while you should see no entries):
select request, status, message, errnum
from   sys.dba_repcatlog;

prompt Entries in the job queue
select job, last_date, last_sec, next_date, next_sec, broken, failures,
       what
from   sys.dba_jobs
where  schema_user = 'REPADMIN';

prompt Replication Status:
select sname, master, status
from   sys.dba_repcat;

-- Returns all conflict resolution methods
-- select * from all_repconflict;

-- Returns all resolution methods in use
-- select * from all_represolution;

prompt Objects registered for replication
select gname, type||' '||sname||'.'||oname object, status
from   sys.dba_repobject;
