Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle trigger after logon on schema

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 :: change row in sql 
Sql :: show constraints mysql 
Sql :: How to Find Duplicate Values in a SQL Table 
Sql :: foreign key mysql 
Sql :: copy postgres table from one schema into another 
Sql :: postgres datetime now 
Sql :: start mysql 
Sql :: import large .sql files into lampp 
Sql :: select last 2 characters sql 
Sql :: sql distinct with count 
Sql :: convert sql to relational algebra 
Sql :: Assign value to var in SQL 
Sql :: cheatsheet for sql 
Sql :: find lowest number in sql 
Sql :: mysql where value is null 
Sql :: sql query to list all tables in a database sql server 
Sql :: create table in microsoft sql server 
Sql :: postgres get defined index in table 
Sql :: if else in plsql 
Sql :: string to sql timestamp 
Sql :: pl/sql procedure example 
Sql :: mysql disable query caching 
Sql :: import mysql dump command line 
Sql :: sql server change schema of a table 
Sql :: how to select unique element in sql 
Sql :: sql delete all values in a column 
Sql :: sql server convert date to weekday 
Sql :: nullif postgresql 
Sql :: mysql update column to be nullable 
Sql :: sql update insert and delete 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =