In order to impact the changes in the database AuditPlus needs to:
- Generate audit procedures for each audited transaction
- Specify and Build generated procedures
- Run the reorganization program
AuditPlus impact changes in the database using a reorganization program.
This reorganization program is generated using a GeneXus command line executable procedure named 'AuditPlusReorg'.
If necesary, this program can be executed manually from within GeneXus (by performing a 'Run with this only' over the procedure) and can also be executed in a command line.
Running the reorganization program outside GeneXus depends on the web generator:
In a C# environment, GeneXus will build an executable (.exe) program in the 'bin' folder.
In a Java environment, a .class file is generated. For further information on how to run a Main program in java check GeneXus documentation: http://wiki.genexus.com/commwiki/servlet/wiki?16034
By default, this reorganization will impact the database that is being referenced in the current environment.
In the following example, the database objects (triggers, stored procedures, etc) will be created in the '"Production' , which points to a Oracle server.
In some cases, AuditPlus cant't be retreive the information of the DataStores, e.g. when using custum JDBC urls.
Also, sometimes the Knowledge Base doesn't have an environment configured to the target database.
In those cases, the connection information must be configured by the user manually.
For manual configuration of AuditPlus audited tables, edit the procedure 'AuditPlusGetDatastoreParms'.
In this procedure, the user can define the server information (server, database and schema) for each datastore and for each table (if necesary).
In the following example, we will define the information for each datastore:
But the user can easly change this code to read information from a database table or a config file.