“Oracle Trigger” Kode Jawaban

Oracle Trigger

CREATE OR REPLACE TRIGGER my_schema.trigger_name AFTER LOGON ON DATABASE
BEGIN
    INSERT INTO my_log_table
    VALUES (USER AS CONNECTED_USER,
        sys_context('USERENV', 'SESSIONID') AS SESSION_ID,
        substr(sys_context('USERENV', 'OS_USER'), 1, 50) AS OS_USER,
        substr(sys_context('USERENV', 'HOST'), 1, 30) AS HOST,
        SYSDATE AS LOGON_DATE);
END;
ALTER TRIGGER my_schema.trigger_name ENABLE;
VasteMonde

Oracle Compile Trigger

alter trigger MY_SCHEMA.TRIGGER_NAME compile;
VasteMonde

Jawaban yang mirip dengan “Oracle Trigger”

Pertanyaan yang mirip dengan “Oracle Trigger”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya