在 SQL Server Management Studio 中丢失 IntelliSense
我正在运行 SQL-2008 R2 服务器。
通常,当我编写查询时,我会得到一个完整的 IntelliSense,显示数据库中的所有对象。
但现在当我执行任务时,它没有显示 IntelliSense。相反,当我写对象名称时,它显示该对象无效!但是,运行查询会给出正确的结果。
我关闭了管理工作室并重新启动它。现在一切正常。
我想知道到底出了什么问题。有什么想法吗?
I am running SQL-2008 R2 Server.
Usually when I write a query, I get a full-versed IntelliSense displaying all the objects in my Database.
But now when I was onto a task, it showed no IntelliSense. Instead, when I wrote the object names, it showed that object is invalid! However, running the Query gives correct results.
I shut-down the Management studio and restarted it. Now all works fine.
I wanna know what was actually wrong. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能需要刷新它。要么
Ctrl+Shift+R
You probably needed to refresh it. Either
Ctrl+Shift+R
从我回答的另一个问题...有一种方法可以自动刷新,而无需手动执行 Control Shift R 时间。
我找到了一个提供免费社区版插件的插件。 SSMS Boost 提供了一些有用的功能,可以绕过 SSMS 的缺点。
为了自动刷新,我设置了 F5 的快捷方式来运行查询,然后设置自动刷新 Intellisense。现在,每次执行时,我的智能感知缓存都会自动刷新。似乎复制了 Red Gate 的 SQL Prompt Experimental 功能中的自动刷新功能。
From another question I answered... there is way to auto fresh without having to manually do Control Shift R time.
I found an addin that offers a free community edition addin. SSMS Boost offers some helpful features that bypass the shortcomings of SSMS.
To auto refresh, I setup the shortcut for F5 to Run Query and then Auto Refresh Intellisense. Now, everytime I execute, my intellisense cache is automatically refreshed. Seems to replicate the functionality of auto refresh in Red Gate's SQL Prompt Experimental functionality.
一张图片胜过1000个字。
A picture is worth a 1000 words.
要激活列名的 IntelliSense:
首先键入 FROM 子句 (
FROM tblEmps
),然后返回并键入 SELECT 子句 (SELECT EmpID, LName
)。这样,IntelliSense 将帮助您选择要包含在 SELECT 语句中的列名称。
这里的技巧是在键入 SELECT 子句之前键入 FROM 子句,以便 IntelliSense 知道要建议哪些列。
To activate IntelliSense for Column Names:
First type the FROM clause (
FROM tblEmps
), then second, go back and type the SELECT clause (SELECT EmpID, LName
).This way IntelliSense will help you pick out the Column Names to include in your SELECT statement.
The trick here is to type the FROM clause prior to typing the SELECT clause, so IntelliSense knows which Columns to suggest.
我发现有时您必须在其他人给出的缓存刷新步骤之前执行数据库“刷新”。
I've found that sometimes you have to do a database "refresh" before the Cache refresh step given by others.