Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically refresh the SQL Server Management Studio intellisense cache?

In SQL Server Management Studio if the user creates new table columns, tables, etc. the user needs to refresh the IntelliSense cache using CTRL+Shift+R.

Is there a setting or some way to automate this so it can automatically be refreshed right after inserting a new table, etc?

like image 856
Emad-ud-deen Avatar asked Jun 21 '12 12:06

Emad-ud-deen


People also ask

How do I refresh SQL Server Management Studio?

With your focus in the Query window, press Ctrl+Shift+R. This will refresh your cache and now your query will be happy with you.

How do I enable auto suggestions in SSMS?

How to Enable IntelliSense Feature in SSMS. Open SSMS, click Tools -> Options -> Expand Text Editor -> Expand Transact-SQL and click on IntelliSense as shown in the snippet below. Under Transact-SQL IntelliSense Settings ensure “Enable IntelliSense” checkbox is enabled.

How do I clear my SSMS cache?

To clear SQL Server's cache, run DBCC DROPCLEANBUFFERS , which clears all data from the cache. Then run DBCC FREEPROCCACHE , which clears the stored procedure cache.


1 Answers

I don't know that there is a way to automatically refresh the cache without manually pressing Ctrl+Shift+R (or equivalent, e.g. the menu). The reason is that when the app talks to the database too much, people complain that it is too chatty (perhaps someone could write a simple add-in that does this - using something like query notifications to indicate something has changed in the metadata views?). You may also want to consider an add-on like SSMS Boost (though with a quick keyword search I see no mention of this functionality on its feature page) or SQL Prompt (but also I don't see any evidence of this functionality in their documentation, only a mention here of an experimental feature).

I believe SQL Server Data Tools does this, but I don't know if you can control the frequency of the refresh. And using that tool may also require a significant shift in how you think about database development.

like image 138
Aaron Bertrand Avatar answered Sep 25 '22 00:09

Aaron Bertrand