ALTER TABLE PARAMSENHA ADD NRTEPCODAUT NUMBER
/
ALTER TABLE PARAMSENHA ADD IDUTCTRLFAC VARCHAR2(1)
/

CREATE TABLE CODACESSLOGIN (
    NRCODACESSLOGIN     NUMBER          NOT NULL,
    CDOPERADOR          VARCHAR2(12),
    CDACESSLOGIN        VARCHAR2(10),
    NRTENTATIVAS        NUMBER DEFAULT 0,    
    DTVALIDADE          DATE,
    STATUS              VARCHAR2(1),
    NRORG             	NUMBER 	        DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO           	VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
    DTINCLUSAO        	DATE            DEFAULT SYSDATE,
    DTULTATU          	DATE            DEFAULT SYSDATE,
    NRORGINCLUSAO     	NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERINCLUSAO    	VARCHAR2(12)    DEFAULT '1' 					NULL,
    NRORGULTATU      	NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERULTATU      	VARCHAR2(12)    DEFAULT '1',
        CONSTRAINT PK_CODACESSLOGIN PRIMARY KEY (NRCODACESSLOGIN, NRORG),
        CONSTRAINT CKC_IDATIVO_CODACESSLOGIN CHECK (IDATIVO IN ('S','N'))
)
/