Many times, database triggers are used to record logins by users. Here is an example of a login trigger that inserts a row into a table every time a user connects.
CREATE OR REPLACE TRIGGER logonaudit AFTER LOGON ON DATABASE
BEGIN
insert into system.login_history values(user, sysdate);
END;
What would be the advantages and disadvantages of using a trigger as opposed to auditing with the statement below?
AUDIT SESSION; (in 3-5 sentences)