Adds another system audit table after auditing is installed.


sp_addaudittable devname




There are additional considerations when using sp_addaudittable:
  • Auditing must already be installed when you run sp_addaudittable. To add a system audit table:
    1. Create the device for the audit table, using disk init. For example, run a command like this for UNIX:
      disk init name = "auditdev2",
      physname = "/dev/rxyla", 
      size = "5K"
    2. Add the device to the sybsecurity database with the alter database command. For example, to add auditdev2 to the sybsecurity database, use:
      alter database sybsecurity on auditdev2
    3. Execute sp_addaudittable to create the table.

  • The SAP ASE server names the new system audit table and the new segment according to how many audit tables are already defined. For example, if five audit tables are defined before you execute the procedure, the SAP ASE server names the new audit table sysaudits_06 and the new segment aud_seg_06. If you specify “default”, the SAP ASE server places the segment on the same device as the sybsecurity database. Otherwise, the SAP ASE server places the segment on the device you name.

  • A maximum of eight audit tables is allowed. If you already have eight audit tables, and you attempt to execute sp_addaudittable to add another one, the SAP ASE server displays an error message.

  • For information about how to install auditing, see the installation documentation for your platform. See the System Administration Guide for information on how to use auditing.

See also alter database, disk init in Reference Manual: Commands.


The permission checks for sp_addaudittable differ based on your granular permissions settings.


With granular permissions enabled, you must be a user with manage auditing privilege.


With granular permissions disabled, you must be a user with sso_role.


Values in event and extrainfo columns from the sysaudits table are:



Audit option


Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference