Error 2501 : Cannot find a table or object with the name . Check the system catalog.
This is very generic error beginner DBAs or Developers faces. The solution is very simple and easy. Follow the direction below in order.
Fix/Workaround/Solution:
Make sure that correct Database is selected. If not please run USE YourDatabase.
Check the object or table name. They must be spelled correct.
If database is case sensitive please use correct case.
Use object belongs to other owner use two parts name as scheme_name.object_name.
Reference : Pinal Dave (https://blog.sqlauthority.com)
4 Comments. Leave new
Table schema name is automatically changing.
for ex: one letter is missing in the schema name & when i run dbcc showcontig it is showing the object doesn’t exist
Error 2501 : Cannot find a table or object with the name
The thing to note here is that if you have a table not part of the default schema i.e. dbo the schema name table name combination has to be enclosed in single quotes.
Example:
DBCC CHECKIDENT (‘TestSchema.TestTable’, reseed, 1)
If you do this:
DBCC CHECKIDENT (TestSchema.TestTable, reseed, 1)
The period between the schema name and table name will be underlines. Hovering over it will say: Incorrect syntax near ‘.’
If you only put the table name i.e. DBCC CHECKIDENT (TestTable, reseed, 1) and run this statement you will get an error that this table cannot be found.
BTW I’m using SQL2008. Not sure if it works this way in SQL2005
Before any query just type “Use ‘database name'”
followed by your query
and this should work
Simple surrounding it in single quotes.
DBCC CHECKIDENT (‘Chemical.Products’, RESEED, 0)