| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| 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 |
|
#2
|
| 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 |
|
#3
|
| 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 > > |
|
#4
|
| 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" > 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. |
|
#5
|
| 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" > 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? |
|
#6
|
| 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]" 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" > > >> 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? > |
|
#7
|
| 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" > Aaron > > Do you have any idea what medu is? |
|
#8
|
| 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]" 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" > >> Aaron >> >> Do you have any idea what medu is? > |
|
#9
|
| 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" > Duh... I thought what else it could possibly mean... and nothing came up for > me... now it seems so obvious. > > thanks! |
|
#10
|
| 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. |
![]() |
| Thread Tools | |
| Display Modes | |