Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle trigger after connect

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: show slave status mysql 
Sql :: mysql trim 
Sql :: create table in mysql 
Sql :: psql select unique 
Sql :: CX_Oracle - import data from Oracle to Pandas dataframe 
Sql :: sql date get month 
Sql :: how to use group_concat in sql server 
Sql :: check if string is a number sql 
Sql :: postgresql dump and restore db 
Sql :: oracle show column of table 
Sql :: update using case in mysql 
Sql :: mysql database create 
Sql :: sql trim whitespace 
Sql :: min salary in sql 
Sql :: get current month last date in sql server 
Sql :: sql mm/dd/yyyy format 
Sql :: mysql change password 
Sql :: cursor.execute in python sqlite3 
Sql :: mysql utc timestamp 
Sql :: not exists mysql 
Sql :: create index mysql cli 
Sql :: vowels in sql 
Sql :: windows services sql 
Sql :: delete all value query 
Sql :: mysql connection w3 
Sql :: mysql local password denied 
Sql :: mysql find duplicates in same table 
Sql :: mysql cast null to string 
Sql :: android sqlite add column if not exists 
Sql :: update with inner join sql server 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =