Invalid object name 'information_schema.columns' in SQL Server

ErikE picture ErikE · May 16, 2011 · Viewed 15.1k times · Source

The following query used to work:

select * from information_schema.columns where column_name like ...

But now it's throwing an error:

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'information_schema.columns'.

The application was upgraded but the view still has to exist in the database.

Answer

ErikE picture ErikE · May 16, 2011

Either:

  1. The database has a case-sensitive collation, try all upper case INFORMATION_SCHEMA.COLUMNS.
  2. Or you don't have permission.

(This question was asked by a coworker and didn't seem to be on the site so I asked and answered it.)