Log Manager
<< Table Data Comparer | IBExpert | Import data >>
Databases are full of information. Sometimes it is helpful to log certain aspects of the information manipulation (SELECTs, INSERTs, UPDATEs, DELETEs), to gain an insight what is really happening in a database. The IBExpert Log Manager can be found in the IBExpert Tools menu. This feature is unfortunately not included in the free IBExpert Personal Edition.
Select the database to be logged from the drop-down list of registered databases. When initially opened, the Log Actions page displays check options for logging INSERT, UPDATE and DELETE actions,
below which the selected table's fields and field data types are displayed. A log script can be generated for several tables simultaneously by selecting the required tables using the [Ctrl + Shift] keys. The logging options, for example which INSERT, UPDATE and DELETE actions on which tables, can be checked individually or alternatively, the Log Manager pull-down menu can be used to either Prepare All Tables or to Unprepare All Tables. Take into consideration however, that when all actions on all tables are to be logged, this could slow the database performance somewhat.
The data logging triggers templates can be altered as wished using the standard IBEBlock on the Block page (if you are using a pre-2009 version of IBExpert alterations can be made using the IBExpert Options menu item, General Templates / Data Logging Triggers).
Please note: all tables which are to be logged must be prepared for logging and committed, before any transactions can be logged! When new tables are added to a database, the log needs to be updated (simply select the transaction types which should be logged by double-clicking on the check boxes and compile).
Once the actions have been selected, the Log Actions page displays the SQL code:
which can be copied to clipboard, if wished, using the right-click SQL Editor Menu.
The Log Data page displays the new and old values:
If a system error message appears when clicking on this page, stating that an IBExpert system table is missing, open any table from the DB Explorer and click on the Logging page in the Table Editor. You will then be automatically asked whether IBExpert should generate certain system tables. After confirming and committing, you should have no further problems!
On the Log Data page the following can be user-specified: Start Date, End Date (both with timestamp), individual or all users and individual or all actions. The specified log can also be logged to file if wished, by clicking on the Log to Script button, which produces a new window:
where the Script File Name can be specified, and on the Options page, how often a COMMIT-command should be inserted. Finally the Script Details page enables the user to write his own Start of Script and End of Script.
This log file can even be used as a sort of replication. This is because, as opposed to the logging specified in the Database Registration, which only logs all IBExpert actions, the Log Manager logs all actions and operations on the database itself, including those of all users.
Back to the Log Manager Editor, the Options page:
allows the user to specify the following options:
- Immediately compile after Prepare or Unprepare
- Autogrant privileges when compiling (generally this should be activated).
It is even possible to log trigger bodies based on the IBEBlock feature:
This has replaced the Data Logging Triggers page in the IBExpert Options menu item, General Templates.
See also:
Understanding the log file
back to top of page
<< Table Data Comparer | IBExpert | Import data >>