New answers tagged

1

We can use oracle fine grained audit (dbms_fga package). But as always - any audit costs some additional work for database )) Here is an example: SYS@mydb> BEGIN 2 DBMS_FGA.add_policy (object_schema => 'scott', 3 object_name => 'EMP', 4 policy_name => 'EMP_SEL', ...


2

An alternative to modifying model might be to create a stored procedure in the master database that contains whatever you need to do. Then you mark this as startup proc (sp_procoption). You might have to put in a WAITFOR in there in case SQL Server executes this before model has been recovered and tempdb has been created. For you to play with. I've only used ...


0

If you read the top accepted answer on the StackOverflow you linked, it takes a step back and asks the question "why are you creating permissions for users on TempDB"? They're unnecessary for users to create, access, and manage temporary objects in it. The permissions you mentioned are already implicitly granted to all users with Connect access to ...


0

How are you doing the audit? With Stored routines? Consider using the USER() function. But be careful about how you define the functions; it may give you root@localhost instead of the actual "user".


0

I do not recommend it instead of creating users, because your table and index size will grow. But, some companies doing what you said. Adding a new column on their tables like CreatedBy and ModifiedBy. After the data change, they search their audit table with the table which is holding user information.


2

If I understand your question correctly, you are asking how to pass an application user name to MySQL to be recorded in an audit table. You can use a user-defined variable, which is local to the session in which it is created. Your application code will set it to the name of the logged-in user once it is authenticated. Your audit code can then reference that ...


Top 50 recent answers are included