SQL> connect testuser Enter password: ERROR: ORA-04098: trigger 'SYS.CHECK_USERS_TRIGGER' is invalid and failed re-validation Warning: You are no longer connected to ORACLE.
SOLUTION
There is an after logon trigger which is invalid. To fix the issue by either way of the following :
1)Fix the after logon trigger to make it valid.
2)Disable the invalid after logon trigger.
SQL>ALTER TRIGGER SYS.CHECK_USERS_TRIGGER DISABLE ;
3)Drop the invalid after logon trigger.
SQL>drop trigger SYS.CHECK_USERS_TRIGGER;
We must be careful when using AFTER LOGON triggers, because if after logon trigger becomes invalid or failed to execute due to some other errors, it prevents the users (even DBA users) from logging in. The only way to resolve this error would be to connect with SYSDBA privileges.