CREATE TABLE LOGREPLICACARDPLA 
(
	NRLOGREPLICACARDPLA 	NUMBER NOT NULL,
  DTREPLICACAO 				DATE NOT NULL,
	CDFILIAL 				VARCHAR2(4) NOT NULL,
	CDSERVFILI 				VARCHAR2(5) NOT NULL,
	DTMESORIGEM 			DATE NOT NULL,
	DTMESDEST 				DATE NOT NULL,
	IDERRO 					VARCHAR2(1) DEFAULT 'S' NOT NULL
		CONSTRAINT CKC_IDERRO_LOGREPLICACARDPLA CHECK (IDERRO IN ('S','N')),
	NRORG 					NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    DTINCLUSAO 				DATE NOT NULL,
    CDOPERINCLUSAO 			VARCHAR2(12) DEFAULT '1' NOT NULL,
    DTULTATU 				DATE NOT NULL,
    NRORGINCLUSAO 			NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    NRORGULTATU 			NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    CDOPERULTATU 			VARCHAR2(12) DEFAULT '1' NOT NULL,
    IDATIVO 				VARCHAR2(1) DEFAULT 'S' NOT NULL
		CONSTRAINT CKC_IDATIVO_LOGREPLICACARDPLA CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT PK_NRLOGREPLICACARDPLA PRIMARY KEY (NRLOGREPLICACARDPLA)
)
/
CREATE INDEX IDXLOGREPLICACARDPLA01 ON LOGREPLICACARDPLA (DTREPLICACAO)
/
CREATE INDEX IDXLOGREPLICACARDPLA02 ON LOGREPLICACARDPLA (CDFILIAL, CDSERVFILI, DTMESORIGEM, DTMESDEST, DTREPLICACAO)
/