When IntelliSense Is Unavailable
There are certain cases when the IntelliSense options might not work as you expect.
The following conditions might affect the behavior of IntelliSense:
There is a code error above the cursor.
If there is an incomplete statement or other coding error above the location of the insertion point, IntelliSense may be unable to parse the code elements, and therefore will not work. You can comment out the applicable code to enable IntelliSense again.
The insertion point is inside a code comment.
IntelliSense options are not available when the insertion point is within a comment in your source file.
The insertion point is inside a string literal.
IntelliSense options are not available when the insertion point is inside the quotation marks around a string literal, for example:
WHERE FirstName LIKE 'Patri%|'
The automatic options are turned off.
Many IntelliSense features work automatically by default, but you can disable any feature.
Even when automatic statement completion is disabled, you can use an IntelliSense feature. For more information, see How to: Modify IntelliSense Options.
The following issues apply to the Database Engine Query Editor:
The IntelliSense functionality of the Database Engine Query Editor does not support all Transact-SQL syntax elements. Parameter help does not support the parameters in some objects, such as extended stored procedures. For more information, see Transact-SQL Syntax Supported by IntelliSense.
Intellisense is only available when the Database Engine Query Editor is connected to an instance of the SQL Server 2008 Database Engine. IntelliSense is not available when the Query Editor is connected to earlier versions of the Database Engine.
IntelliSense is turned off in the Database Engine Query Editor when the SQLCMD mode is set on.
Intellisense functionality does not cover database objects created by another connection after your editor window connected to the database. You can choose one of these three mechanisms to refresh the cache of objects for your editor window:
Select the Edit menu, select IntelliSense, then select Refresh Local Cache.
Use the CTRL+Shift+R keyboard shortcut.
Disconnect your editor window from the instance of the Database Engine and reconnect.
Completion lists do not include database objects for which you do not have permissions. IntelliSense flags references to objects for which you do have permissions. For example, if you open a script that is written by someone else, any references to objects for which that person has permissions and you do not are flagged as incorrect.
Completion lists might stop working if you lose the connection to the instance of the SQL Server Database Engine. Reconnect to the instance.