The Embedded Audit Trail is a database audit (Audit Trail) feature developed for the Protheus system. Its premises are:
* High performance
* Easy installation and configuration
* Simple operation
* Safety
You will see the procedure of initial activation and configuration of the tool, with examples of use.
- Go to Configurator > Environment > Embedded Audit Trail > Applicator
- The configuration is done by exception and rule, for the levels of Group of Companies, Tables and Fields. Here are some examples and usage scenarios. For more details on the technical part of the Audit Trail Applicator, we recommend reading this link: http://tdn.totvs.com/display/framework/Embedded+Audit+Trail+-+aplicador
Example 1: Audit only table SA1 of Company 01 for Inclusion, Edition and Deletion.
- Set up Company 01 at the Company Group level with the Exception Scope, so that the company's tables are not audited, and at the Table level, select the SA1 table with the Rule Scope, so that it is audited with Operation 7 (Inclusion, Edition and Deletion).
Example 2: Audit all tables in Company 01, for Edition only.
- Set up Company 01 ate Company Group level with the Rule Scope, so that the tables of this company are audited with Operation 2 (Edition).
Example 3: Audit only tables SA1, SA2 and SB1 of Company 01 for Inclusion, Edition and Deletion, and fields C5_VEND1 and C5_COMIS1 of table SC5 for Inclusion.
- Set up Company 01 at Company Group level with Exception Scope, so that the tables of this company are not audited. At the Table level select the SA1, SA2 and SB1 tables with the Rule Scope so that these tables are audited with Operation 7 (Inclusion, Edition and Deletion), and table SC5 with the Link Scope (to make the connection between the Group of Companies and the Fields, since the table will not be audited, only the fields). At the Fields level, select fields C5_VEND1 and C5_COMIS1 with Rule Scope to have these fields audited.
Example 4: Audit all Company 01 tables for Deletion, except tables SC5 and SC6 that will not be audited.
- Set up Company 01 at the Company Group level with the Rule Scope so that the tables of this company are audited with Operation 3 (Deletion), and at the table level, select tables SC5 and SC6 with the Exception Scope so that these tables are not audited.
When you have completed the settings, click Confirm. A Creating triggers window will appear, informing the creation of triggers in the database for the configured audits, and at the end, a message informs Registration added successfully.
After you have configured the Embedded Audit Trail, and you have moved an audited table, you can check the Log Report in the path Configurator > Environment > Embedded Audit Trail > Log Report. Further information about the report: http://tdn.totvs.com/pages/viewpage.action?pageId=185732813
Audit table cleanup
To avoid an exaggerated growth of the audit table over time, a cleanup feature is provided to set, by audited Company Group, a time interval (3, 6, 9 or 12 months) to clear the table, that is, audit data prior to that period are deleted permanently. A second table is created and it will log these cleanups (table FWPURG_ATT). In this log table, the user who set up the cleanup for that group of companies, its code, the number of days and the date of the cleaning is audited. This table will be created in the main Tablespace of the system, not on the Tablespace set for the Audit Trail (not configurable). You cannot clear this table.
To configure the cleanup, follow the procedure below:
- On the Applicator screen (Configurator > Environment > Embedded Audit Trail > Applicator), a History Time column has been added. In this column you can select from the following options: Three Months / Six Months / Nine Months / Twelve Months / All.