Configure Table with LogInsert disabled

Apr 30, 2015 at 2:22 PM
I should configure my table in AutoAudit without Insert treacing, so i do:
exec [Audit].[pAutoAudit] @SchemaName='Common', @TableName='Sender', @LogInsert = 0, @LogUpdate = 1, @LogDelete = 1
but i have this error :
Creating AutoAudit for table: [Common].[Sender]
Options:  @StrictUserContext=1, @LogSQL=0, @BaseTableDDL=0, @LogInsert=0, @LogUpdate=1, @LogDelete=1, @AuditSchema='Audit', @ColumnNames='<All>'
Dropping existing AutoAudit components
Creating Update trigger
Creating Delete trigger
Creating _Deleted view
Creating _RowHistory view
Creating _RowHistory UDF
Error - @LogInsert, @LogUpdate and @LogDelete MUST all = 2 to create _TableRecovery function.
How resolve this? I don't need recovery function , is there some possibility to disable it?
Thank you very much for any help.
Apr 30, 2015 at 3:08 PM
Hi Giuseppe,

The error message is just indicating that the _TableRecovery function could not be created because you are just logging Updates and Deletes at a detail level of 1 (Audit Header only, no detail on the data values). You must have full details logging for that UDF to be created as specified in the error message.

All the other triggers, views and functions are getting created though.
It would be a good idea to log inserts as well (@LogInsert=1)

You can see update and delete log entries in the [Audit].[AuditHeader] table, in the _RowHistory views, and in the _RowHistory UDF.

Marked as answer by JohnSigouin on 4/30/2015 at 8:09 AM