Thanks for the question, Nikita.
Asked: April 23, 2020 - 11:23 am UTC
Last updated: April 24, 2020 - 3:21 am UTC
Version: 11.2.0.4.0
Viewed 1000+ times
SQL> create or replace 2 trigger check_all_logins 3 after logon on database 4 declare 5 x int; 6 begin 7 select count(*) 8 into x 9 from clients 10 where username = user; 11 12 select count(*) 13 into x 14 from machines 15 where machine = sys_context('userenv','TERMINAL'); 16 end;
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library