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

SQL Anywhere 12.0.0 » SQL Remote » Managing SQL Remote systems » Reporting and handling replication errors » Run an error-handling procedure

 

Collect errors from the remote database

Use the following procedure to send portions of a remote database's output log to the consolidated database. The information is written to a file and the file can contain output logging information from some or all remote databases in the system.

 To configure SQL Remote to collect output log information from remote databases
  1. Configure the remote databases to send output log information to the consolidated database.

    1. Use the SET REMOTE statement with the output_log_send_on_error option to send log information when an error occurs.

      On the remote database, execute the following command:

      SET REMOTE link-name OPTION
      PUBLIC.output_log_send_on_error = 'Yes';

      When the SQL Remote Message Agent (dbremote) reads any messages that start with the error indicator E, it sends the output log information to the consolidated database. See SET REMOTE OPTION statement [SQL Remote].

    2. This step is optional. Set the SET REMOTE statement with the output_log_send_limit option to limit the amount of information that is sent to the consolidated database. The output_log_send_limit option specifies the number of bytes at the end of the output log (that is, the most recent entries) that are sent to the consolidated database. The default is 5K.

      If you supply an output_log_send_limit value that exceeds the maximum message size, SQL Remote overrides the output_log_send_limit value and sends only what can fit within the maximum message size.

      On the remote database, execute the following command:

      SET REMOTE link-name OPTION
      PUBLIC.output_log_send_limit = '7K';

      See SET REMOTE OPTION statement [SQL Remote].

  2. Configure the consolidated database to receive log information.

    On the consolidated database, run the SQL Remote Message Agent (dbremote) with either the -ro or the -rt options.

    See SQL Remote Message Agent utility (dbremote).

  3. This step is optional. To test your configurations, set the output_log_send_now option to send output log information to the consolidated database.

    On the remote database, set the output_log_send_now option to YES.

    On the next poll, the remote database sends the output log information and then resets the output_log_send_now option to NO.

 See also