Search code examples
sql-serverinformation-schema

Invalid object name 'information_schema.columns' in SQL Server


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.


Solution

  • Either:

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