accept LOCAL_NAME  prompt 'Enter global name of new node : Example: DB_NAME.DOMAIN.COM  '

connect ods/ods@&LOCAL_NAME

CREATE TABLE asr_chg_log (
        Chg_No          NUMBER NOT NULL,
        Target_DN       VARCHAR2(255),
        Type            VARCHAR2(128),
        Change          VARCHAR2(2000),
        Op_Time         VARCHAR2(128),
        Server          VARCHAR2(128),
        orclGuid        VARCHAR2(32),
        orclParentGuid  VARCHAR2(32),
        Chg_Seq         NUMBER DEFAULT 0,
        Retry_Cnt       NUMBER DEFAULT 0)
 TABLESPACE OLTS_DEFAULT;

CREATE TABLE ods_chg_stat (
        chg_no          NUMBER ,
        supplier        VARCHAR2(128) NOT NULL,
        consumer        VARCHAR2(128) NOT NULL)
 TABLESPACE OLTS_DEFAULT;


CREATE UNIQUE INDEX uiasr_chg_log on ods.asr_chg_log(chg_no,server,chg_seq);

CREATE UNIQUE INDEX uiods_chg_stat ON ods.ods_chg_stat(supplier,consumer);

GRANT ALL ON ods.ods_chg_stat TO ods_server;

GRANT ALL ON ods.asr_chg_log TO ods_server;

