on 10-16-2014 2:11 AM
Hi,
I want to call a certain procedure that logs everytime a database user is created or deleted in the db ( sql Anywhere 16).
For this I have written a Function that should be called via a trigger when a row is inserted or deleted from table SYS.SYSUSER.
However, I am not able to create a trigger on this table.
Am I allowed to create trigger on this or is there someother way to get notified whenever a user is created or deleted for db?
New to sybase please help.
heres is my create trigger code
CREATE TRIGGER myTrigger AFTER INSERT ON sys.sysuser
REFERENCING NEW AS newRecord
FOR EACH ROW
BEGIN
-- call myFunction
END;
Hi Sunil,
I wouldn't change trigger of system tables. With new release you could lose your changes.
If you want to check for new users, looking from db and not from your application, you could create a scheduled event that once a day search in:
select user_name,creation_time
from sysuser join sysobject on sysuser.object_id = sysobject.object_id
Bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may be interested in SQL Anywhere's auditing feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.