I have a table in my database named SysMessages that I use for storing custom error messages. I have been using this for years in SQL Server 2005/2008 with no problem, but in 2012 whenever I refer to this table in a select statement the database engine returns master.sys.SysMessages instead of my table. Even if I fully qualify the table name like this: Select * From MyDB.dbo.SysMessages, it still returns master.sys.SysMessages.
This breaks my application because my SysMessages table has a different structure.
Obviously this was not a good choice of table name in the first place, but it's out there in hundreds of customer databases so simply renaming the table is not a simple solution. Strangely enough I can use this name in DDL, so I can create a new table named SysMessages and drop it, I just can't refer to it in a select statement.
Is there anything that can be done to query the custom SysMessages table without recreating it?