intellisense not updating

This is a discussion on intellisense not updating within the sqlserver-tools forums in Microsoft SQL Server category; 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 ...

Go Back   Database Forum > Microsoft SQL Server > sqlserver-tools

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 07:11 PM
Default intellisense not updating

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?
--
Ed
Reply With Quote
  #2  
Old 08-26-2008, 07:33 PM
Default Re: intellisense not updating

Ed White (ewhite-at-newsgroups.nospam) writes:
> 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?


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.

--
Erland Sommarskog, SQL Server MVP, esquel-at-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/prodinf...ons/books.mspx

Reply With Quote
  #3  
Old 08-26-2008, 07:44 PM
Default Re: intellisense not updating

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.
--
Ed


"Erland Sommarskog" wrote:

> Ed White (ewhite-at-newsgroups.nospam) writes:
> > 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?

>
> 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.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel-at-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/prodinf...ons/books.mspx
>
>

Reply With Quote
  #4  
Old 08-26-2008, 08:49 PM
Default Re: intellisense not updating

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-at-microsoft.com, "Ed White"
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.


Reply With Quote
  #5  
Old 08-26-2008, 09:03 PM
Default Re: intellisense not updating

P.S. From
http://connect.microsoft.com/SQL/fee...edbackID=33648
1



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




On 8/26/08 6:11 PM, in article
B7DF67D2-AEE8-48E8-8855-9174C4A8BF07-at-microsoft.com, "Ed White"
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
> 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?


Reply With Quote
  #6  
Old 08-26-2008, 10:22 PM
Default Re: intellisense not updating

Aaron

Do you have any idea what medu is?

--
Thanks
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
www.SQLTuners.com


"Aaron Bertrand [SQL Server MVP]" wrote in message
news:C4DA11F4.104DD%ten.xoc-at-dnartreb.noraa...
> P.S. From
> http://connect.microsoft.com/SQL/fee...edbackID=33648
> 1
>
>
>
> 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
>
>

>
>
> On 8/26/08 6:11 PM, in article
> B7DF67D2-AEE8-48E8-8855-9174C4A8BF07-at-microsoft.com, "Ed White"
> 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
>> 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?

>



Reply With Quote
  #7  
Old 08-26-2008, 10:39 PM
Default Re: intellisense not updating

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-at-TK2MSFTNGP02.phx.gbl, "Kalen
Delaney" wrote:

> Aaron
>
> Do you have any idea what medu is?


Reply With Quote
  #8  
Old 08-26-2008, 11:13 PM
Default Re: intellisense not updating

Duh... I thought what else it could possibly mean... and nothing came up for
me... now it seems so obvious.

thanks!
--
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
www.SQLTuners.com


"Aaron Bertrand [SQL Server MVP]" wrote in message
news:C4DA2889.10512%ten.xoc-at-dnartreb.noraa...
> 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-at-TK2MSFTNGP02.phx.gbl,
> "Kalen
> Delaney" wrote:
>
>> Aaron
>>
>> Do you have any idea what medu is?

>



Reply With Quote
  #9  
Old 08-27-2008, 12:10 AM
Default Re: intellisense not updating

No worries. You've caught me in a few "Duh"s too. :-)


On 8/26/08 10:13 PM, in article #AWv8p#BJHA.2480-at-TK2MSFTNGP02.phx.gbl,
"Kalen Delaney" wrote:

> Duh... I thought what else it could possibly mean... and nothing came up for
> me... now it seems so obvious.
>
> thanks!


Reply With Quote
  #10  
Old 08-27-2008, 07:26 AM
Default Re: intellisense not updating

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-at-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-at-microsoft.com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.