SQL Server 2008 Management Studio doesn’t recognize new Schema


I have created a new Schema in a database called Contexts. Now when I want to write a query, Management Studio doesn't recognize the tables that belong to the new Schema. It says: 'Invalid object name Contexts.ContextLibraries'…


INSERT INTO [Contexts].[ContextLibraries] (ChannelId, [IsSystem])
VALUES (@ChannelId, 1)

When I try the same thing on my local database, it does work…

Any ideas?

I did try to change the Default schema for the user from dbo to Contexts but this doesn't work. Also checked Contexts in Schemas owned by this user without success.

Update: Apparently the sql query does work but the editor gives a fault saying the object is invalid.

Best Solution

You may need to refresh SSMS: if raw SQL works.

Frankly, the easiest way is to close object explorer on the server and re-open. The SQL Server client tools have a problem with caching back into the Jurassic period...