Error: "[Microsoft][ODBC SQL Server Driver][SQL Server]EXECUTE permission denied on object 'xp_se
The following error occurs when attempting to re-index or defrag the Messagestats database: "[Microsoft][ODBC SQL Server Driver][SQL Server]EXECUTE permission denied on object 'xp_servicecontrol', database 'master', owner 'dbo".
This error will occur if the user account that is attempting the re-index does not have sufficient rights on the Messagestats database.
Verify the following requirements are met for all SQL Servers housing the Messagestats Database:
1. The current user must be a member of the Quest Messagestats Admin local group (for read & write access), or Quest Messagestats Web local group (for read access only) on the computer hosting the SQL server.
2. The Messagestats Database should have the Quest Messagestats_Admin role (for read & write access) and Quest Messagestats_Web role (for read access only).
3. The SQL server should have logins for the Quest Messagestats_Admin and Quest Messagestats_Web groups, whereby both logins should have access to the Quest Messagestats database for the appropriate roles.