Interface BBjAdminAuditReplicationJob

All Superinterfaces:
BBjAdminCommitPropertyWriter, BBjAdminCommitWriter, BBjAdminPropertyReader, BBjAdminPropertyWriter, BBjAdminReplicationJob, Remote, Serializable

public interface BBjAdminAuditReplicationJob extends BBjAdminReplicationJob

In BBj 13.0 and higher, Data Change Auditing is the process of building an audit trail via Change Audit Jobs. Each job consists of a job name, location for the audit log database(s), a list of one or more directories and/or data files to be monitored, and the frequency at which the log database should rollover.

When an application changes a monitored data file using direct file access calls from a BBj program or via SQL, the auditing system logs the change and type of change to an "audit log database." At any time, an administrator can query the log database using the interface built into the Enterprise Manager or query the log database tables directly using SQL.

When using change auditing, overhead is typically minimal since in most cases, administrators configure jobs to use the default asynchronous mode. In asynchronous mode, the audit system adds audit details to a background queue rather than waiting for the log operation to complete before continuing. In synchronous mode (not recommended) it completes the logging of the audit details before allowing the original write or remove operation on the file to complete.


BBj Sample Code

declare BBjAdminBase api!
declare BBjAdminList auditJobs!
declare BBjAdminAuditReplicationJob job!

api! = BBjAdminFactory.getBBjAdmin("admin", "admin123")

REM Get a list of all the audit jobs currently configured
auditJobs! = api!.getAuditJobs()
print "* Currently configured audit jobs *"
if auditJobs!.size() > 0
for i = 0 to auditJobs!.size() - 1
job! = cast(BBjAdminAuditReplicationJob, auditJobs!.get(i))
print " " + job!.getString(BBjAdminAuditReplicationJob.NAME)
next i
endif
print
print "* CREATE A NEW AUDIT JOB *"
print "* Note: Job will be configured to rollover every month *"
input "Enter the name for a new audit job: ", name$
input "Enter the full path for the audit database root directory (must be empty): ", dbRoot$
input "Enter the full path to a file to add to the job: ", filename$

REM Create the new job with the appropriate rollover frequency and add a single file to the job
rolloverFrequency = BBjAdminAuditReplicationJob.ROLLOVER_MONTHLY
job! = api!.createAuditReplicationJob(name$,dbRoot$,0,rolloverFrequency,1)
job!.addFile(filename$,0,"")
job!.commit()