Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » SQL Anywhere database servers » Database server action logging

 

Redirecting messages to a file using a facility identifier on Unix

On Unix, you can redirect database server messages to a file that is available to the system administrators.

Prérequis

There are no prerequisites for this task.

Contexte et remarques

The following steps explain how to redirect messages on Solaris, but you can also do this on Linux, IBM AIX, and Mac OS X. On other platforms, such as HP-UX, the syslog.conf file is found in a different location. You can place the /var/adm/sqlanywhere file in whatever location you want.

 Task
  1. Choose a unique facility identifier that is not already being used by another application that is running on your system.

    You can do this by looking in the /etc/syslog.conf file to see of any of the localn facilities are referenced.

  2. Edit the /etc/syslog.conf file and add the following line, where localn is the facility identifier you chose in step 1:

    localn.err;localn.info;localn.notice  /var/adm/sqlanywhere
  3. Create the /var/adm/sqlanywhere file:

    touch /var/adm/sqlanywhere
  4. Tell the syslogd process that you have modified the syslog.conf file by finding the process ID of syslogd:

    ps -ef | grep syslogd

    and then running the following command where pid is the process ID of syslogd:

    kill -HEAP pid
  5. Start your database server with the following command, where localn is the facility identifier you chose in step 1:

    dbsrv16 -s localn ...

Résultat

Any messages that the database server reports to Syslog are redirected to the /var/adm/sqlanywhere file.

 See also