Hi.
According to CREATE AUDIT POLICY - SAP HANA SQL and System Views Reference - SAP Library, for the HANA platform it's possible to audit all objects within a schema by using <schema_name>.* when creating the audit policy.
For an example, I have a schema called SCHEMA and a table called MY_TABLE in it:
When I to audit a single object, like a table,it works well:
CREATE AUDIT POLICY all_my_table AUDITING ALL DELETE, INSERT, SELECT, UPDATE ON SCHEMA.MY_TABLE LEVEL CRITICAL;
But when I try to add the audit policy I get a syntax error:
CREATE AUDIT POLICY all_objs_in_schema AUDITING ALL DELETE, INSERT, SELECT, UPDATE ON SCHEMA.* LEVEL CRITICAL;
Has anyone encountered something like that?
Thanks!
Hi Ariel,
This feature is available in SPS09.
Check the page no. 27 of below document:
Its written: "You can now specify a schema if you want to audit all database objects belonging to the schema"
Regards,
Vivek
Hi Ariel,
I also tried this and it throws an error.
I checked creating Audit Policy via Graphical Method and there I could not Select Schema to be audited. I have to individually select the objects to be audited.
Then I opened the PDF version of the guide and found that below statement is not present there:
"for the HANA platform it's possible to audit all objects within a schema by using <schema_name>.* when creating the audit policy." Open page 319-
http://help.sap.com/hana/SAP_HANA_SQL_and_System_Views_Reference_en.pdf
In the HTML Guide, <audit_object_name> ::= <table_name> | <view_name> | <procedure_name> | <schema_name>.*
while in PDF Guide <object_name> ::= <table_name> | <view_name> | <procedure_name>
As "Only objects of type table, view, and procedure can be specified in the <target_audit_action_entry>". Selecting * means selecting all Objects, So I guess this functionality is not supported yet and it is written incorrectly in the Guide in HTML Version.
It will be better to contact SAP for this.
Regards,
Vivek
Add a comment