SQL Server Forum / General / SQL Server Tools / August 2008
intellisense not updating
|
|
Thread rating:  |
Ed White - 26 Aug 2008 23:11 GMT I'm using SQL Server 2008 and I'm writing Queries in SMSS. I find that if I add a new object (e.g. a new Table) to the database, the intellisense does not recognize it (i.e. it puts a red underline underneath it) until I exit SQL Server and restart it. My queries run OK even with the red underline, but the red underline is annoying as I don't know until I run the script whether the red underline is pointing to a real error or just hasn't updated yet. Is there a way to refresh the intellisense without having to restart SQL Server?
 Signature Ed
Erland Sommarskog - 26 Aug 2008 23:33 GMT > I'm using SQL Server 2008 and I'm writing Queries in SMSS. I find that > if I add a new object (e.g. a new Table) to the database, the [quoted text clipped - 4 lines] > to a real error or just hasn't updated yet. Is there a way to refresh > the intellisense without having to restart SQL Server? As I turn off intellisense the first thing I do when I have installed SSMS, I cannot help with the question.
But I like to point out taht SSMS != SQL Server. If you stop and start SSMS, you do not stop and start SQL Server. SQL Server is a server application that could be running on a different machine. And you definitely do not have to restart SQL Server itself, to refresh the metadata for Intellisense. In fact, I would expect it to be sufficient to open a new query window.
 Signature Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Ed White - 26 Aug 2008 23:44 GMT Actually, you are correct--I misspoke. I have to stop and restart SMSS, not SQL Server, to refresh intellisense. I tried disconnecting and re-connecting to SQL Server from SMSS hoping that would refresh, but it did not.
 Signature Ed
> > I'm using SQL Server 2008 and I'm writing Queries in SMSS. I find that > > if I add a new object (e.g. a new Table) to the database, the [quoted text clipped - 14 lines] > metadata for Intellisense. In fact, I would expect it to be sufficient > to open a new query window. Aaron Bertrand [SQL Server MVP] - 27 Aug 2008 00:49 GMT Did you try opening a new query window, like Erland suggested?
On 8/26/08 6:44 PM, in article F48C4DD1-78E8-4E69-ABE6-67880A34DAE6@microsoft.com, "Ed White" <ewhite@newsgroups.nospam> wrote:
> Actually, you are correct--I misspoke. I have to stop and restart SMSS, not > SQL Server, to refresh intellisense. I tried disconnecting and re-connecting > to SQL Server from SMSS hoping that would refresh, but it did not. Mark Han[MSFT] - 27 Aug 2008 11:26 GMT Hello
Thank you for contacting Microsoft Online Community Support. It is Mark, a SQL Server Engineer. I'm glad to assist you with the issue.
For this case, you indicated that the queries run OK even with the red underline; you would like let the red underline disappear if the query is right. Is it correct? If I misunderstand anything, please tell me directly. It will help us to resolve this issue quickly. Once the issue resolved, I'll appreciate your verification. To better understand the issue, please help to confirm/collect the following information. 1) what the queries are used to do? For example: to "select" or to create a new table ? If it is convenient, please provide me the sample of the queries. I would like to try to re-produce the issue.
2) please tell me the confirguration of the intellisense in detail. Some screen-shot will be better.
3) To narrow down the issue, please do the following test and tell me if the intellisense recognize the table(under the table name, if there is a red line). The detail steps are below: a) open a new query window b) choose a databse (master) c) try to type the command " select * from dbo.spt_values " and make sure the table dbo.spt_values is from database master
4) please tell me the version/edition of the SQL Server
Besides, if you would like to refresh the intellisense, please take the following Edit > IntelliSense > Refresh Local Cache
Besides, my email address is v-fathan@online.microsoft.com(remove the online), you can send the information/test result via email.
If you have any questions or concerns, please tell/email me.
I look forward to hearing from you.
Thank you
Best regards, Mark Han Microsoft Online Community Support =========================================================== Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. =========================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ============================================================
 Signature This posting is provided "AS IS" with no warranties, and confers no rights.
Ed White - 27 Aug 2008 21:08 GMT Hi Mark, Aaron answered my question. Ctrl-Shift-R or Edit->IntelliSense->Refresh Local Cache from the SSMS menu fixes the problem. Opening a new query window does not fix it.
I had tried to find something on the menu to refresh the cache, and looked under Tools, Debug, etc., but didn't think to look under Edit. I also searched under Help and didn't find anything on it. This message board is great!
Thanks, Ed
> Hello > [quoted text clipped - 68 lines] > ============================================================ > This posting is provided "AS IS" with no warranties, and confers no rights. Mark Han[MSFT] - 29 Aug 2008 03:51 GMT Hi ED,
Thank you for the confirmation. I'm glad that the issue has been resolved.
To make issue easier to understand, I would like to explain the following. 1) IntelliSense save the information of databases in local cache. in the instance, the information in the local cache doesn't match the real information of the database.
2) To refresh the local cache will clear the previous information in the cache and save the new information of the database
Hope my explanation address your concern. If anything is unclear, please tell me.
Besides, is there anything I can assist you with the techonical issue? if so, please email me (v-fathan@online.microsoft.com)(remove the online)
Thank you again for choosing Microsoft Online Community Support.
Best regards, Mark Han Microsoft Online Community Support ========================================================= Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. =========================================================
 Signature This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
Aaron Bertrand [SQL Server MVP] - 27 Aug 2008 01:03 GMT P.S. From http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=33648 1
<snip>
IntelliSense retrieves a snapshot of metadata from database and caches it locally. If database metadata becomes out of sync with the cache, user needs to flush it by using medu or CTRL+Shift+R.
Regards, Eric Kang SQL Server Program Manager
</snip>
On 8/26/08 6:11 PM, in article B7DF67D2-AEE8-48E8-8855-9174C4A8BF07@microsoft.com, "Ed White" <ewhite@newsgroups.nospam> wrote:
> I'm using SQL Server 2008 and I'm writing Queries in SMSS. I find that if I > add a new object (e.g. a new Table) to the database, the intellisense does [quoted text clipped - 4 lines] > yet. Is there a way to refresh the intellisense without having to restart > SQL Server? Kalen Delaney - 27 Aug 2008 02:22 GMT Aaron
Do you have any idea what medu is?
 Signature Thanks Kalen Delaney, SQL Server MVP www.InsideSQLServer.com www.SQLTuners.com
> P.S. From > http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=33648 [quoted text clipped - 31 lines] >> restart >> SQL Server? Aaron Bertrand [SQL Server MVP] - 27 Aug 2008 02:39 GMT It was supposed to be "menu" (bad typo I assume)...
Edit > IntelliSense > Refresh Local Cache
Questionable place for it, but I found out about it way too late to complain. :-\
On 8/26/08 9:22 PM, in article OzONeN#BJHA.4340@TK2MSFTNGP02.phx.gbl, "Kalen Delaney" <replies@public_newsgroups.com> wrote:
> Aaron > > Do you have any idea what medu is? Kalen Delaney - 27 Aug 2008 03:13 GMT Duh... I thought what else it could possibly mean... and nothing came up for me... now it seems so obvious.
thanks!
 Signature Kalen Delaney, SQL Server MVP www.InsideSQLServer.com www.SQLTuners.com
> It was supposed to be "menu" (bad typo I assume)... > [quoted text clipped - 10 lines] >> >> Do you have any idea what medu is? Aaron Bertrand [SQL Server MVP] - 27 Aug 2008 04:10 GMT No worries. You've caught me in a few "Duh"s too. :-)
On 8/26/08 10:13 PM, in article #AWv8p#BJHA.2480@TK2MSFTNGP02.phx.gbl,
> Duh... I thought what else it could possibly mean... and nothing came up for > me... now it seems so obvious. > > thanks!
|
|
|