Index

» Home

» OCS Deployment

» Front End Server

» Edge Server

» Web Conferencing Server

» Archiving Server

» Certificates

» Communicator Web Access

» A/V Server

» VOIP 'N' Mediation

» Group Chat Server

» Migration

» Exchange UM

» OCS Issues

» OCS Disaster Recovery

» Miscellaneous

 

 

Different SQL Queries to Retrieve Archived Messages

When we install and activate Archiving server, "LcsLog" is the database which gets created at the SQL Server. If users are enabled for archiving, the messages exchanged between them will be archived in this database.

There is no way you can see the archived messages on the OCS Server itself without any additional script or tool.

We are going to discuss few scripts what you would use to see the messages.

You need to run these scripts on the SQL Server which hosts Archiving database (LcsLog).

Following query will show all archived messages Archived in the database LcsLog...

SELECT * from dbo.Messages, dbo.Users where
dbo.Users.UserId = Messages.FromId

Following query will show all the archived messages per user. In the following example, the output will show messages exchanged to and by ocsa@ocsdom.local.

SELECT * from LcsLog.dbo.Messages, LcsLog.dbo.Users where LcsLog.dbo.Users.UserId =
LcsLog.dbo.Messages.ToId and LcsLog.dbo.Users.UserUri = 'ocsa@ocsdom.local'

Following query will show all the archived messages per user (only message)

SELECT Body from LcsLog.dbo.Messages, LcsLog.dbo.Users where LcsLog.dbo.Users.UserId =
LcsLog.dbo.Messages.ToId and LcsLog.dbo.Users.UserUri = 'ocsa@ocsdom.local'

There is a resource kit tool "Archiving CDR reported tool" which can make your life easier upto an extent if you are looking for some pre-defined reporting features... You can learn more here...

Related Links:

How to configure Archiving Server (OCS 2007)

Archiving CDR Reporter Tool and custom SQL Queries

 

 

 
OCS Made Easy!
 

 

Copyright, OCSpedia.com. Microsoft, MS-DOS, Windows, Windows 2000, Windows XP, Windows Server 2003, Windows NT, Windows 98, Windows 95 are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and other countries. All other names are registered trademarks of their respective companies. Should any right be ran afoul, it is totally unintentional. Send us an e-mail and we will promptly and gladly rectify it. All external sites will open in a new browser. Ocspedia.com does not endorse external sites and is not responsible for their content. For broken links, site problems or any feedback - please send an email at uc@ocspedia.com.