Hi,
I need to create a logon trigger for a user, so that when he logs in, he changes the nls_date_format. I granted the necessary privileges, but when I execute the creation it gives the message of insufficient privileges. What can it be?
The privileges I granted were: connect, create session, alter session, create trigger and administer database trigger.
The trigger I am creating is as follows:
CREATE OR REPLACE TRIGGER TG_POS_LOGON
AFTER LOGON ON DATABASE
DECLARE X DATE;
BEGIN
if (user = 'XXXXX') then
execute immediate 'alter session ste nls_date_format= ''DD/MM/YYYY''';
end if;
END;
/
Where am I going wrong?