Msg 2547, Sev 16, State 1 - Unable to process object ID X (object "Y") because it is a synonym

This is a really exotic error!

It happened during an Index Rebuild operation of a CRM database and there is absolutely no documentation on the Internet about this error!

 

So here is what you could do regarding this error:

1. Replace the Rebuild Indexes maintenance step with a Reorganize Indexes step and an Update Statistics step

2. Check the database for corruption issues using DBCC CHECKDB. Verify there are 0 allocation and 0 consistency errors. If any errors are found, repair them.

3. Check if there are any duplicate rows at the database object where this error occurred. For a CRM database, an additional recommendation good starting point would be to check the table ExchangeSyncIdMappingBase for duplicate rows and eliminate them.

Good luck with that error if you ever manage to see it! :)

 

A solution has been found by my colleague, Balmukund Lakhani. It is blogged here:

https://sqlserver-help.com/2015/02/11/solution-getting-error-while-running-rebuild-index-on-crm-database-unable-to-process-object-id-id-object-name-because-it-is-a-synonym-if-the-object-referenced-by-the-synony/