When trying to establish a connnection to the OCS, Lync pool or Archive Manager you recieve the following error:
"User does not have permission to perform this action. Error creating linked server"
The Messagestats service account needs to be granted sysadmin rights on the SQL server where the Messagestats database resides.
This will allow the linked server to be created for accessing the information in the CDR database for OCS, Lync or Archive Manager database.
The sysadmin right can be taken away from the Messagestats service account after the linked server and the connection to the OCS, Lync pool or Archive Manager in Messagestats have been created.