For organizations that are subject to compliance regulations, the ErrorLogReplayer tool helps ensure that archiving and call detail recording (CDR) messages that failed to insert into the Archiving or CDR database are inserted into these databases. Administrators can use this tool to make sure all messages are archived in the Archiving and CDR databases for accurate tracking of usage information and call failure information. You can download this tool and other Microsoft Lync Server 2010 Resource Kit tools from the Download Center.

Authors: Kangmo Kim, Lei Hua

Publication date: December 2010

Product version: Microsoft Lync Server 2010

Introduction

For organizations that are subject to compliance regulations, the ErrorLogReplayer tool helps ensure that Archiving and CDR messages that failed to insert into the Archiving or CDR database, respectively, are inserted into these databases. Administrators can use this tool to make sure that all messages are archived in the Archiving and CDR databases for accurate tracking of usage information and call failure information. You can download this tool and other Microsoft Lync Server 2010 Resource Kit tools from the Download Center.

This article describes the input parameters and output messages and files of the tool. You will also see examples of using the tool with the actual path to error log files written by the Archiving and CDR services.

Description

The Archiving and CDR services insert the messages that are available from the message queues into the Archiving and CDR databases. These services don't usually fail to insert messages into the databases, but there are some cases where failure happens. If an error happens during the data insertion process, these services write the failed messages into error log files in the local file system. The error log file contains complete information about the failed messages. This information can be used to attempt to re-insert them into the database. The ErrorLogReplayer tool performs this activity. It reads the error log file, and then inserts the failed messages into the Archiving or CDR database.

Output

ErrorLogReplayer is a command-line tool. In the Command Prompt window, this tool shows the total number of messages in the error log file. The tool also shows the number of successful and failed messages inserted into the databases.

If the ErrorLogReplayer fails to insert a message into one of the databases, an output file that has the prefix replayer-rejected- is generated. This output file contains all the messages that failed to be inserted into the database. Each message in the file lists the reason for the failure. You can edit the file and use it as an input file for the tool so that you can run the tool until all failed messages are inserted into the database.

Purpose

Organizations that are required to meet the compliance regulations must ensure that all messages are archived in the Archiving database. Administrators can use this tool to insert messages that failed to be inserted into the Archiving database.

Administrators can also use this tool to insert messages that failed to be added in the CDR database for accurate tracking of usage information and call failure information.

Requirements

ErrorLogReplayer uses the following command-line usage and requires three parameters:

ErrorLogReplayer <error log file name> <SQL Server instance> <database name>

The first parameter, <error log file name>, is the path to the error log file that is written by the Archiving or CDR service. To find the path to the error log file, see the Examples section later in this document.

The second parameter, <SQL Server instance>, is the Microsoft SQL Server instance name of the Archiving or CDR database.

The last parameter, <database name>, is the name of the Archiving or CDR database. The name of the Archiving database is LcsLog. The name of the CDR database is LcsCDR.

Examples

On the Monitoring Server, the error log file generated by the CDR service is located at the following:

C:\%ProgramFiles%\Microsoft Lync Server 2010\Monitoring Server\Call Detail Recording\Logs\RTCLogDBFailure.log

On the Archiving Server, the error log file generated by the Archiving service is located at the following:

C:\%ProgramFiles%\Microsoft Lync Server 2010\Archiving Server\Logs\RTCLogDBFailure.log

Figure 1 shows the ErrorLogReplayer tool inserting the messages that failed to be added to the CDR database by the CDR service. The first argument, RTCLogDBFailureForCDR.log, is the log file generated by the CDR service that contains the list of messages that failed to be inserted into the database. The second argument, (local)\, is the SQL Server instance name of the CDR database. The last argument, LcsCDR, is the name of CDR database.

From the console output, the total number of messages from the error log file (479) is displayed, as well as the number of messages successfully inserted into database (479) and the number of messages that failed to be inserted into database (0).

Figure 1. ErrorLogReplayer inserting CDR messages into CDR database

 

Figure 2 illustrates the ErrorLogReplayer tool inserting the messages that failed to be added to the Archiving database by the Archiving service. The first argument, RTCLogDBFailureForArch.log, is the log file that is generated by the Archiving service. It contains the list of messages that failed to be inserted into the database. The second parameter, (local)\, is the SQL Server instance name of the Archiving database. The last argument, LcsLog, is the name of the Archiving database.

Figure 2. ErrorLogReplayer inserting Archiving messages into Archiving database

If a message fails to be inserted into the database, you will see the message shown in Figure 3. It shows the name of output file that contains the failed messages and the reasons why they were not inserted. In this case, replayer-rejected-20100831-14.23.20.log contains them. After modifying the file, you can use the file as the input file for the tool. You can iterate this process until you successfully insert all failed messages into the database.

Figure 3. ErrorLogReplayer failure message

Summary

In this article, you have seen the input parameters, output messages, and output files with examples of running the ErrorLogReplayer tool. The tool was able to insert failed messages into the Archiving or CDR database by using error log files written by the Archiving or CDR service. As an administrator, you can use the tool to insert all failed messages into the Archiving and CDR databases to meet the compliance regulations and accurately track usage information and call failure information.

Warning   Do not insert the error log from the CDR service into the Archiving database or vice-versa. The tool will insert data into the wrong database without displaying any errors.

Do not run the tool with the same error log file more than once. The tool does not check whether the message has already been inserted into the database.

Lync Server Resources

We Want to Hear from You

Keywords: CDR, archiving, call detail recording, compliance, administrator, call failure, call, error, log, replayer, errorlogreplayer, service, replayer-rejected-, failure, archiving database, CDR database, SQL Server, compliance regulations