/************************* BEGINNING OF SCRIPT ******************************/

SET ECHO ON

SPOOL XC_CREATE_REPGROUP.out

CONNECT repadmin/sutron@xcmas

BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPGROUP(
     gname => '"XCREP"',
     qualifier => '',
     group_comment => '');
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_DATA1"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_GOESQC"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_PPDATA1"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_PPLIST"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_RTUQC"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_SITES"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_SITESENSORS"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_TXTDATA1"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
     gname => '"XCREP"',
     type => 'TABLE',
     oname => '"XC_VER"',
     sname => '"XCMANAGER"',
     copy_rows => TRUE,
     use_existing_object => TRUE);
END;
/
BEGIN
   DBMS_REPCAT.SET_COLUMNS(
     sname => '"XCMANAGER"',
     oname => '"XC_VER"',
     column_list => '"VERSION"');
END;
/
BEGIN
   DBMS_REPCAT.ADD_MASTER_DATABASE(
     gname => '"XCREP"',
     master => 'XCSLV',
     use_existing_objects => TRUE,
     copy_rows => TRUE,
     propagation_mode => 'ASYNCHRONOUS');
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_DATA1"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_GOESQC"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_PPDATA1"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_PPLIST"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_RTUQC"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_SITES"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_SITESENSORS"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_TXTDATA1"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
   DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
     sname => '"XCMANAGER"',
     oname => '"XC_VER"', 
     type => 'TABLE',
     min_communication => TRUE,
     generate_80_compatible => FALSE);
END;
/
BEGIN
	DBMS_REPCAT.RESUME_MASTER_ACTIVITY(
	gname => '"XCREP"');
END;
/

SET ECHO OFF

SPOOL OFF

/************************* END OF SCRIPT **********************************/

