在SQL 2008(SSMS)中的Intellisense中,架构更改未更新 [英] Schema changes not updating in Intellisense in SQL 2008 (SSMS)

查看:77
本文介绍了在SQL 2008(SSMS)中的Intellisense中,架构更改未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到SQL Server 2008的SSMS中有一个问题-感觉像是个错误,但我怀疑有一个功能".

我打开了多个选项卡,例如,一个表中有一个alter table脚本,而在另一个选项卡中有一个查询该表的SProc,执行我的Alter Table脚本时,更改未反映在另一个选项卡中的Intellisense中. /p>

我可以创建新查询,但更改仍未反映在Intellisense中.如果我打开一个新的SSMS实例,则所做的更改将得到反映,直到我进行进一步的更改为止.

但是,如果您否决了Intellisense并继续进行修改后的表和代码,则所有内容的编译都不会引起抱怨(如预期的那样).

这是一个错误吗?一个特征?是否有某个地方可以改变这种行为?我检查了选项,但什么也没看到

解决方案

在我发布问题之前,我立即找到了在Google上成功搜索的正确短语.

是的,这确实是一个功能!智能感知依赖于您需要手动刷新的本地缓存.参见:

http://blogs. msdn.com/dtjones/archive/2008/09/11/refreshing-the-intellisense-cache.aspx

也:忍者的替代品

IMHO有点烦人,但是我敢肯定,专家们会认为,以这种方式存在一些重要的需求.经过进一步检查,我已经能够在一个工具栏上添加一个刷新本地缓存"按钮.快速尝试刷新后,似乎需要花费一些时间,因为Intellisense已从过时,变为不存在,然后又恢复到大约一分钟左右.

我很想提出这个问题,但是我将其保留在这里,以防其他人解决此问题,或者直到其他人做出其他决定为止...

I've notice an issue - it feels like a bug but I suspect a 'feature' - in SSMS in SQL Server 2008.

I have various tabs open, for example an alter table script in one table and a SProc that queries that table in another tab, and when I execute my Alter Table script the changes are not reflected in Intellisense in the other tab.

I can create new queries and the changes are still not reflected in Intellisense. If I open a new SSMS instance, the changes are reflected, until I make further changes, of course.

However, if you over-rule Intellisense and push ahead with your modified tables and code, everything compiles without a grumble (as expected).

Is this a bug? A feature? Is there a setting somewhere that alters this behaviour? I checked in the options but couldn't see anything

解决方案

And no sooner than I post the question, I find the right phrase for a successful search on google.

Yes folks, this is indeed a feature! The intellisense relies on a local cache which you need to manually refresh. See:

http://blogs.msdn.com/dtjones/archive/2008/09/11/refreshing-the-intellisense-cache.aspx

Also: Ninjapig's alternative

It's more than a bit annoying IMHO, but I'm sure the experts would argue there is some important need for it to be this way. After further checking, I've been able to add a 'Refresh Local Cache' button to one of the toolbars. Having quickly tried a refresh, it appears that the refresh takes some time, because Intellisense went from being out of date, to non-existent, and back to updated or a minute or so.

I'm tempted to pull this question, but I'll leave it here in case it helps someone else with this issue, or until someone else decides otherwise...

这篇关于在SQL 2008(SSMS)中的Intellisense中,架构更改未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆