Why the two-step process? Just create the after_logon trigger as AFTER LOGON TO DATABASE. Absolutely no need to use a procedure.