Doug Deitterick's Blog

Information about Microsoft Lync, OCS, and Exchange UM.

Sample Lync Server Archiving Report Available

Sample Lync Server Archiving Report Available

  • Comments 97
  • Likes

Update 11/26/13 - I have release an updated version of the reports.  This version of the reports includes a Dashboard.  See the changelog below for more details on what's new.

The Sample Lync Server Archiving Report is an update to the popular Sample OCS Archiving Report, however this report has been completely redesigned based on feedback from the community.  We've expanded the report to include more information from the archiving database and we've changed the layout of the report to make the information easy to consume.

Features

  • Dashboard report to provide an overview about information in the archiving database
  • View detailed information about P2P IM conversations and conferences
  • Search for IMs and Conferences by SIP address and date
  • Select from multiple Lync Server Archiving databases to search against
  • Web-based SSRS reports can be used by anyone with rights and a web browser

The reports have been tested against Lync Server 2010 and Lync Server 2013 using SQL Reporting Services 2012.  You will need to have a functioning SQL Reporting Services server before trying to deploy this report.

Installing the Reports

  1. Download the latest version of the Sample Lync Server Archiving Report
  2. Extract the zip file
  3. Open Report Manager – http(s)://<SRS Server>/Reports
  4. Click on New Folder
  5. Give the folder a name – i.e. LyncArchivingReport
  6. Click OK
  7. Click on the folder you just created
  8. Click on Upload File
  9. Browse to the location where you extracted the LyncArchivingReport zip file and select Search.rdl
  10. Click OK to upload the report
  11. Repeat Steps 9 and 10 for the rest of the reports
  12. (Optional) - To remove the reports from the default view, since you can't directly access them:
    1. Go to the properties of the Conference Details Report by clicking on the drop-down and selecting Manage 
    2. Click on Hide in tile view
    3. Click Apply
    4. Go back to the LyncArchivingReport folder and repeat for the Conversation Details Report
  13. To configure the report to use your SQL Server(s), you will need to open the Search report in SQL Server Report Builder
    1. Click on the drop-down for the Search report and select Edit in Report Builder
    2. If this is the first time you've used Report Builder on this computer, select Run when the Do you want to run this application? prompt appears
  14. In SQL Server Report Builder, in the Report Data section, expand Parameters and double-click on SqlConnectionString
  15. In the Report Parameter Properties window, click on Available Values
  16. Click on Specify values
  17. Click on Add
  18. Enter your Lync Server Archiving Server SQL Server information in boxes in the following format:
    1. Label: SQL Server Friendly Name
    2. Value: Data Source=<SQL Server FQDN\Instance>;Failover Partner=<SQL Server FQDN\Instance>;Initial Catalog=LcsLog
      1. i.e. Data Source=LAB-SQL1\Lync;Failover Partner=LAB-SQL2\Lync;Initial Catalog=LcsLog
      2. Note: If you're not using SQL Mirroring for the LcsLog database, then you don't need to include the Failover Partner piece.
  19. Repeat Steps 17 and 18 for all Lync Server archiving databases in your environment
  20. (Optional) - If you only have one archiving database, you can set the default value so that you don't need to select the SQL Server every time you use the report
    1. Click on Default Values
    2. Click on Specify values
    3. Click on Add
    4. In the drop down, select your SQL Server
    5. Click on General
    6. Select Hidden under Select parameter visibility
  21. Click OK
  22. Click Save in the Quick Access Toolbar to save the changes to the reporting server
  23. Close SQL Server Report Builder
  24. Repeat Steps 13 through 23 for the Dashboard report.

If there are users that will be running the Dashboard report that don't have dbo rights to the LcsLog database, they may get the following error:

An error has occurred during report processing. (rsProcessingAborted)
 Query execution failed for dataset 'DatabaseVersion'. (rsErrorExecutingCommand)
  The EXECUTE permission was denied on the object 'DbGetVersion2', database 'LcsLog', schema 'dbo'.

This is because they don't have access to run the DbGetVersion2 stored procedure.  You will need to perform the following additional steps to grant access:

In SQL Server Management Studio, add the user or group that contains the users you want to be able to run the Dashboard report in the Security > Users folder under the LcsLog database.  Right-click on the user and select Properties.  Make sure that the Securables page is displayed:

Click on the Search button:

Make sure that Specific objects is selected and click OK.  Click on the Object Types button:

Select Stored procedures and click OK.  Click on the Browse button:

Select [dbo].DbGetVersion2] and click OK:

Click OK:

Select the Grant check box for the Execute permission.  Click OK.

The reports are now ready to be used.

 

Using the Reports

Dashboard


Note: You may need to click on the image above in order to read the text.

The Dashboard report shows you an overview about information contained in the archiving database.  You can see information about the SQL Server that hosts the archiving database, as well as, information about the archiving database itself.  The number of instant messages and conferences are shown for the time period selected as well as top users for instant messages and conferences.

 

Search


Note: You may need to click on the image above in order to read the text.

The Search report is the main report that you will use.  As it's name implies, this is the report that you will use to generate your queries against the archiving database.  The report requires a couple pieces of data, namely the SIP addresses of the user's that you want to search against and the date range of the search.  If you want to search every user or if you only want to search for any communications to/from a single user, use the NULL option.  This essentially means any user.  You can also pick the SQL Server you want to run the query against.

The results are broken up into two sections, Instant Messages and Conferences.  Clicking on the link will drill down into more information for that conversation.

 

Conversation Details Report


Note: You may need to click on the image above in order to read the text.

Drilling down into an instant message conversation will display something similar to above.  You can see when and who sent the initial message, as well as the client versions of the users, and a transcript of the conversation.

 

Conference Details Report


Note: You may need to click on the image above in order to read the text.

Drilling down into a conference shows you a lot of information gathered by the Archiving Server role.  You can expand each section to take a look at the data that was captured.

 

Please leave any questions/comments/feedback in the comments section below.

 

Click here to download the latest version of the report.

 

Changelog

November 2013 Release

Search - 1.2

  • Increased width of "Data from" textbox
  • Changed End Date range to -1 day from the current date
  • Added support for SQL mirroring
  • Other formatting changes

Conversation Details Report.rdl - 1.1

  • Increased width of "Data from" textbox
  • Fixed conversations missing from federated contacts

Conference Details Report - 1.1

  • Increased width of "Data from" textbox
  • Fixed column formatting issues - changed to a landscape layout
  • Added Expand All/Collapse All toggle
  • Added additional sorting options
  • Other formatting changes

Dashboard - 1.0

  • Initial Release

 

Known Issues

  1. Meeting Data Location for Lync Server 2010 conferences is not a valid link.
  2. All times are displayed in UTC.  Trying to convert the times to local time zones automatically isn't possible.
  3. IM conversations that contain Unicode characters may not be displayed correctly.  SSRS doesn't natively have a way to parse RTF text.  If the conversation is stored in the archiving database in RTF, some non-Latin characters may be stored as Unicode.  This means that the report will not display those IM messages correctly.

 

 

Comments
  • Hi!

    I can not get the full report of messages.

    Search report provides a list of sessions. Clicking the link session return blank report with header and footer and w/o messages or errors.

    P.S. I checked the SessionIdTime transmitted to the report conversation . What's the problem?

    Thanks.

  • Hi!

    In the continuation of the post above.

    The report has earned only after the new variable was added to sql query, and it was set to SessionIdTime, converted into a Date format.

    It seems that the report gave an empty request that the parameter SessionIdTime had an incorrect format.

    Thanks.

  • Hi!

    Some messages are saved in RTF? format and thus unreadable in text field. The problem is known. Is there a trick to get around the problem?

    Thanks!

  • @Michael

    Yes, some of the IMs are stored in the database in RTF.  When you say they are unreadable in the text field, what are you seeing?  The report uses some regex expressions to strip out the RTF tags and just leaves the text.  In fact the screenshot above of the Conversation Details Report has messages in RTF and you can see that it is displayed correctly.  Is the report displaying something different for you?  If so, what version of Lync are you using, as well as what version of the clients are being used in the conversation that isn't displaying correctly?

  • Thanks for the answer!

    Lync 2013.

    Yes, regexp cuts special characters, but national symbols in the database are stored in encrypted form (if "lyncflags rtf=1") and are not readable and look like "ebe8e3eaee"..((

    Is there a solution?

    Thanks!

  • Hi Doug,

    Great report, makes it easy for customers to find what they need in their archiving database. One query, how do I change the time format from UTC to local time? I'm in Australia (+10 Melbourne), have looked at the report builder but (as someone that does not customise SQL Reports regularly) am unable to figure out the correct syntax. Could you help?

    Thanks!

    Damien

  • @Damien

    Thanks for the feedback!  Trying to localize the time in the reports is something that's on my list to try and fix.

  • hello,

    thx for the nice report

    for example - www.picamatic.com/.../9400364_704x334.jpg

    first line and last line is good, but others ... ;(

    lync 2013 cu1, sql 2012, russian letters.

  • Hi, question. If you are archiving to Exchange 2013, will you still get results from the search?

    Thank you.

  • @JC

    No.  Archiving to Exchange 2013 will store all archiving information in that user's mailbox and not the LcsLog database.

  • Hi,

    In SQL Reporting Services 2008 R2 does not work?

  • @Fabio Souza

    I didn't test it with SSRS 2008 R2.  It may very well work just fine, but since I didn't test it, I can't say for sure that it will work without issue.

  • I test in SQL Reporting Services 2008 R2, but I am unable to upload the report file, it is showing the below error:

    The report definition is not valid. Details: The report definition

    has an invalid target namespace

    '_schemas.microsoft.com/.../reportdefinition&

    which cannot be upgraded. (rsInvalidReportDefinition) Get Online Help

  • @Fabio Souza

    Thanks for testing.  The report must use some features of SSRS 2012 that aren't available in SSRS 2008 R2.

  • Great set of reports Doug.

    I installed on RS2008R2 with one minor issue, conversations that included a federated contact had no data at all in conversation history. Looked in to it and found that the client version stored in the database for the federated version was NULL. Taking the Join on the client version in the conversation history report allows all to be visible with the exception of the version of course.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment