Writing a trigger for every time a user logs in I want to write a trigger which runs every time a user logs in and saves the name of each user, for example.

I have written trigger in this way:

create or replace TRIGGER LOGON_TRG
AFTER LOGON ON DATABASE
BEGIN
INSERT INTO t_log(ID,NAME) VALUES (S1.NextVal,ora_login_user);
END;


Does anyone have any solutions for this?
I would suggest using basic auditing.  Parameter audit_trail can be set to DB, and you can audit system privileges, including CREATE SESSION.  Auditing CREATE SESSION captures (among others), database and O/S user IDs.  Views of interest are sys.aud$ and dba_audit_session.  You may not need to add a logon trigger if the information you want is already captured through auditing.  L Sallwasser