New in version 6.1.0: See the new features.

Freeze and un-freeze the audit service

audit_freeze()

Freeze and un-freeze the audit service


The Global AuditFreeze can be changed dynamically with this commands (Note that the AuditFreeze setting on the global settings file won’t be changed with this command):

SYNTAX

  • sage/srep:

    audit_freeze(server, TRUE|FALSE)

    Note: server can be a server name string, an opened !file on the server or an opened database on the server.


  • KfLib* (DNet, Java and Cpp):

    Server.audit_freeze(TRUE|FALSE)


  • SQL Engine (sql command and ScODBC):

    AUDIT FREEZE “TRUE|FALSE”


The return value is the previous freeze state (TRUE or FALSE)

When the Audit service is FROZEN there’ll be some operations which will still operate:

  • Opening a file, checks the filetable and filetablefield information to see if that file is audited.

  • audit_transaction() (Also the .Net, Java, Cpp and SQL variants) The last transaction would be kept in memory in case the audit service is unfrozen. It will use that last transaction as the audit transaction. If the audit service remains frozen it won’t write any transaction record on the AuditDb just keep the last one in memory.

  • audit_database() (Also the .Net, Java, Cpp and SQL variants) The audit database can be changed on the current client.

  • The rest of operations will be disabled and no file will be written, only some of them read.


EXAMPLE

To freeze the audit service saving the previous state:

tmp.previousFreezeState = audit_freeze(TRUE)

RELATED TOPICS

Audit service

Audit functions