Publishing audit data

The audit log database records events that affect the entity and link data. iBase automatically creates this database alongside the database that holds the entity and link data, giving it the same database name but with the suffix _log. For instance, the database Crime_ has an audit log database Crime__log (note the double underscore).

About this task

Audit records for the security data are held in the _ AuditLog table in the security database. This information is already replicated if you included the _ AuditLog table when creating the security publication.

To create a publication for audit data, follow these steps. You should accept all the default options unless indicated otherwise in the following instructions.

Procedure

  1. From the Object Explorer list, select Replication > Local Publications, right-click and select New Publication.

    • Server: select the server that is also the Publisher of the entity and link data for the iBase system. (Use the same server for all publications.)

  2. On the Publication Database page, select the existing database that contains the audit data (it ends with the suffix _log). For example, the publication database Crime_ has an audit log database called Crime__log (note the double underscore).

  3. On the Publication Type page, select Merge publication.

  4. On the Subscriber Types page, ensure that only SQL Server 2008 or later is selected.

  5. On the Articles page, expand the Tables node. Select these iBase system tables:

    • Select the _AuditLog table if Audit History is not used.

    • If Audit History is used, select:

      • _Audit

      • _AuditCodes

      • _AuditData

      • _AuditDataBinary

      • _AuditLog

      • _Field

  6. If you are using Audit History, in Article Properties, for all the selected tables, set Copy User Triggers to False and Copy Permissions to True.

  7. Accept any article issues that are reported. Typically SQL Server warns that “ Uniqueidentifier columns will be added to tables”.

  8. Enter a publication name. For example, iBase_audit_data.

  9. Generate the publication in the usual way.

What to do next

After you create the publication:

  1. Restrict access to the tables in the SQL Server database. For more information, see Managing access to data and functions.

  2. Back up the databases. For more information, see Configuring and maintaining databases.

  3. Tell the iBase administrator that the security data at the Publisher is configured for replication.