Installing auditing with installsecurity

The $SYBASE/scripts directory contains installsecurity, a script for installing auditing.

NoteThis example assumes a server that uses a logical page size of 2K.

To use installsecurity to install auditing:

  1. Create the auditing devices and auditing database with the Transact-SQL disk init and create database commands. For example:

    disk init name = "auditdev", 
        physname = "/dev/dsk/c2d0s4", 
        size = "10"
    
    disk init name = "auditlogdev", 
        physname = "/dev/dsk/c2d0s5",
        size = "2M"
    
    create database sybsecurity on auditdev
        log on auditlogdev
    
  2. Use isql to execute the installsecurity script:

    cd $SYBASE/scripts 
    setenv DSQUERY server_name
    isql -Usa -Ppassword -Sserver_name < installsecurity
    
  3. Shut down and restart Adaptive Server.

When you have completed these steps, the sybsecurity database has one audit table (sysaudits_01) created on its own segment. You can enable auditing at this time, but should add more auditing tables with sp_addaudittable. For information about disk init, create database, and sp_addaudittable, see the Reference Manual.