Having a problem with a particular table. Was using Kimberly Tripp's script to rebuild indexes based on fragmentation level. The job failed with this error:
Msg 2501, Sev 16: Could not find a table or object named 'CMS_InfoObjects6'. Check sysobjects. [SQLSTATE 42S02]
I checked sysobjects and see the tablename listed. select object_name(2137058649) returns CMS_InfoObjects6. select object_id('CMS_InfoObjects6') returns null. select object_id(object_name(2137058649)) returns null as well.
I can see the table in EM and can select * from it in QA when using a fully qualified name (owner is not dbo).
dbcc checkdb returns no errors.
declare @name varchar(500) set @name = object_name(2137058649) dbcc checktable (@name)
returns "Could not find a table or object named 'CMS_InfoObjects6'. Check sysobjects."
I'm confused.