简体   繁体   English

SQL Server Management Studio 2008 R2开发人员版intellisense无法正常工作

[英]SQL Server Management Studio 2008 R2 Developer Edition intellisense not working

I installed Developer edition of SQL Server 2008 R2 and find out intellisense is not working or show as other developer talking about. 我安装了SQL Server 2008 R2开发人员版,发现intellisense无法正常工作或显示为其他开发人员所谈论的内容。

Is there anything else I need to do to get intellisense working in SQL Server Management Studio? 为了使intellisense在SQL Server Management Studio中工作,我还需要做其他事情吗?

What I do to get it to work? 我要如何使其正常工作?

Maybe you need to "refresh" the intellisense cache. 也许您需要“刷新”智能感知缓存。

3) IntelliSense should be refreshed with the latest changes in database. 3)应该使用数据库中的最新更改来刷新IntelliSense。 a) Press CTRL+SHIFT+R b) Go to Edit >> IntelliSense >> Refresh Local Cache a)按CTRL + SHIFT + R b)转到编辑>> IntelliSense >>刷新本地缓存

Full list of things to make sure of: 要确保的全部事情清单:

  1. Connected to SQL Server 2008 edition 连接到SQL Server 2008
  2. Intellisense enabled 启用智能感应
  3. Intellisense refreshed Intellisense刷新
  4. Correct settings for "Statement completion" 正确的“语句完成”设置

Check here for a complete instructions with screenshots. 在此处查看带有屏幕截图的完整说明。

If you have recently installed Visual Studio 2010 SP1 you may be encountering a bug. 如果您最近安装了Visual Studio 2010 SP1,则可能会遇到错误。 Microsoft has confirmed that VS 2010 SP1 effectively breaks intellisense in SQL Management Studio. Microsoft已经确认 VS 2010 SP1有效地打破了SQL Management Studio中的智能感知。

Here are a couple of options you can try: 您可以尝试以下几种选择:

  1. DevArt's SQL Complete -$0 free DevArt的SQL Complete- $ 0免费
  2. RedGate's SQL Prompt - $195 <-You can find it at red-gate.com. RedGate的SQL提示-195美元<-您可以在red-gate.com上找到它。

First and foremost you must be working with a SQL Server 2008+ instance, for the server to be able to give you the metadata for intellisense. 首先,最重要的是您必须使用SQL Server 2008+实例,服务器才能为您提供智能感知的元数据。

It is a fine art making intellisense work for you. 这是一种艺术,可以为您提供智能感知。

The first thing you can to do make it recognize the database context is to put 使它能够识别数据库上下文的第一件事是放置

USE databasename;

at the top of your query window. 在查询窗口的顶部。 This gives it a better grasp of where you are working. 这样可以更好地了解您的工作地点。

The next thing you need to get used to is to write your queries in a different order, fill in the FROM clause first, so the skeleton should be something like 您需要习惯的下一件事是以不同的顺序编写查询,首先填写FROM子句,因此框架应类似于

SELECT ^
FROM tblname

or 要么

UPDATE tblname
SET ^

At the position marked ^ , intellisense will have a good idea of what db/table context you are working in. 在标记为^的位置,intellisense将对您正在使用的数据库/表上下文有一个很好的了解。

UPDATE a
SET a.^
FROM tblname a, tbl2 b

Without fully specifying the join condition, just listing the tables as above allows intellisense to work with a. 在没有完全指定联接条件的情况下,仅按上述方式列出表就可以使intellisense使用a.

There are many other tricks, such as if you renamed objects, you're best off to start a new query window or disconnect from the server completely and reconnect, or even restarts SSM Studio. 还有许多其他技巧,例如,如果重命名了对象,则最好启动一个新的查询窗口,或者完全断开与服务器的连接并重新连接,甚至重新启动SSM Studio。

Other reading: 其他阅读:

您还需要与至少2008服务器通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM