|
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