Audit select statement using spring-data-envers - spring-boot

insert, update, delete are audited by spring-data-envers dependency, is there a way to audit as well select statements?
Thanks

Related

oracle, How to exclude certain table from unified Audit policy

I have Oracle 12.2.0.1 unified audit policy for developers:
CREATE AUDIT POLICY dev_dml_audit_policy
ACTIONS DELETE, INSERT, UPDATE
WHEN 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') in (''DEV1'',''DEV2'',''DEV3'') '
EVALUATE PER statement;
This police auditing all DML for all tables in database for users: 'DEV1','DEV2','DEV3' .
I need exclude from auditing certain tables, for example: user1.table1, user2.table2

How do i write PLSQL Query that will update the grant access for multiple tables at once |SQL Developer|

I have a Scenario where I need to write a PLSQL Query to Grant permission to multiple table at once for Particular User Only for example : User_A
tbl_1
tbl_2
tbl_3
tbl_4
tbl_5
tbl_6
tbl_7
tbl_8
The above table as Read Acess only. Now I want to Provide write access , delete access to it
How do I achieve this Scenario?
You can use such a cursor with execute immediate command to grant the desired privileges to User_A for all tables of your current schema(a schema other than User_A) :
SQL> set serveroutput on
SQL> begin
for c in
(select 'grant insert, update, delete on '||t.table_name||' to User_A' as cmd
from user_tables t
order by t.table_name)
loop
dbms_output.put_line(c.cmd);
execute immediate c.cmd;
end loop;
end;
To literally answer your question, and run multiple grants at once, you need to use the CREATE SCHEMA command.
The syntax is a bit tricky because you have to hard-code the name of the user running the statement. And if one of the grants fails, they all fail, which may or may not be a good thing. But compared to a PL/SQL script, or multiple SQL statements, this approach uses less code and is a bit faster.
create schema authorization USER_RUNNING_THE_QUERY
grant select, insert, update, delete on tbl_1 to test_user1
grant select, insert, update, delete on tbl_2 to test_user1
grant select, insert, update, delete on tbl_3 to test_user1
grant select, insert, update, delete on tbl_4 to test_user1
grant select, insert, update, delete on tbl_5 to test_user1
grant select, insert, update, delete on tbl_6 to test_user1
grant select, insert, update, delete on tbl_7 to test_user1
grant select, insert, update, delete on tbl_8 to test_user1;

Oracle: disable trigger before Insert

I'm trying to write a transaction on Oracle DBMS to make a "simple" insert.
In a single transaction I want disable the trigger, make the Insert and re-enable the trigger... I'm working with C# and Oracle Db Oracle Database 11g.....
Is it possible?
How?
Thanks in advance
alter trigger trigger1 disable;
ALTER TABLE evaluations DISABLE ALL TRIGGERS;
ALTER TABLE evaluations ENABLE ALL TRIGGERS;

Audit on dropped and recreate table

I have a table that is dropped every day and then recreated.
I executed some audit actions on that table (select, update, delete, insert, all).
Now I want to use the noaudit command to disable audit, but the table is already dropped, so I get an object does not exist exception.
When this table is recreated, will the audit work on it?
I have version oracle 11g.
Thanks.

how can i audit specific users' statements on specific tables in oracle

I want to do something like this:
AUDIT SELECT, INSERT, UPDATE, DELETE ON HR.EMP BY SCOTT BY ACCESS;
But it has wrong syntax. To fix it, i have to remove "BY SCOTT". How can i implement auditing similar like this in oracle?
In other words, Scott's statements on HR.EMP table should be audited, but not others.
See https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_4007.htm
You try to audit schema object. In this case you cannot specify auditing user (BY SCOTT). This is possible only when auditing sql statements.
Remove BY SCOTT clause:
AUDIT SELECT, INSERT, UPDATE, DELETE ON HR.EMP BY ACCESS;

Resources