Monday, 2 April 2012

SQL SERVER - Refreshing the IntelliSense Cache

Today, I have created one table and tried to create a stored procedure to insert data into this new table in another tab, when I type INSERT INTO then the Intellisense drop down doesn't present me with my new table.

There are cases where the local cache used by IntelliSense becomes stale. Refreshing the cache is easy but not necessarily obvious.

There are two ways to refresh the cache:

1. Hit Ctrl+Shift+R
2. Go to Edit -> IntelliSense -> Refresh Local Cache and

If IntelliSense is not working still, then make sure you have IntelliSense enabled, to check this from the T-SQL Query editor window of current database,
1. Go to Tools -> Options -> Text Editor -> Transact-SQL -> General -> IntelliSense
2. Go to Query -> IntelliSense should be selected
3. Also verify that the T-SQL Editor does not launch in SQLCMD Mode, to check go to Tools -> Options -> Query Execution -> SQL Server -> General, make sure “By default, open new queries in SQLCMD mode” is unchecked.
or Go to Query ->  SQLCMD Mode  should not be selected

Still IntelliSense is not working then sounds like you have a corrupt installation, then re-installing the tools would be recommended, in case something was installed after the fact to change the binaries.

Also make sure you are connected to SQL Server 2008 Edition, because IntelliSense does not work with the previous versions of SQL Server.

No comments:

Post a comment