Installing Auditing

The Adaptive Server auditing feature records information about the use of the server. By default, the auditing feature is not installed, but you can install it by using the instructions in this section. For more information about the auditing features, see the System Administration Guide.

The basic steps to install auditing include:

To install auditing:

  1. Open a Command Prompt window.

  2. Start the isql program as user “sa”:

    isql -Usa -Ppassword -Sserver_name 
    
  3. Determine the next available device number to use for the auditing device using statements similar to the following:

    For the auditing database itself:

    1> declare @devno int
    
    2> select @devno = max(low/16777216)+1 from sysdevices
    
    3>disk init
    
    4> name = "auditdev",
    
    5> physname = "%SYBASE%\data\sybaud.dat",
    
    6> vdevno = @devno,
    
    7> size = 5120
    
    8> go
    

    For the auditing database log:

    1>declare @devno int
    
    2> select @devno = max(low/16777216)+1 from sysdevices
    
    3> disk init
    
    4> name = "auditlogdev",
    
    5> physname = "%SYBASE%\data\sybaudlg.dat",
    
    6> vdevno = @devno, 
    
    7> size = 1024
    
    8> go
    
  4. At the isql prompt, use the disk init command to create the auditing devices.

  5. Create the auditing database:

    1> create database sybsecurity on auditdev
    
    2> log on auditlogdev
    
    3> go
    
  6. Exit isql:

    exit
    
  7. Change to the scripts directory:

    cd %SYBASE%\ASE-12_0\scripts
    
  8. Set the DSQUERY environment variable:

    set DSQUERY = server_name
    
  9. Start the isql program as user “sa” with the instsecu script as the input file:

    isql -Usa -Ppassword -Sserver_name -iinstsecu
    
  10. Restart Adaptive Server.

After auditing is installed, no auditing occurs until a System Administrator or System Security Officer enables auditing with the auditing system procedures. See the System Administration Guide for information about enabling auditing features.