Solved

How do I set intellisense to work in sql server 2008 r2 sql server management studio?

Posted on 2014-11-23
7
226 Views
Last Modified: 2014-11-24
I installed Adventureworks db to SQL Server management studio.  I can only get one line of code to show intellisense. If I say Select * from sales.salesOrderheader , I cannot get sales.salesorderheader.customerId to come up in intellisense. The sales and salesorderheader display in intellisense. If I write another query below that one, no intellisense at all enables.
Also, this does not work either.

select a.customerid
from Sales.SalesOrderHeader  a
0
Comment
Question by:chaverly
7 Comments
 
LVL 18

Expert Comment

by:SimonAdept
Comment Utility
One thing that I've experienced is that it depends on the context from which you start your query. Does the database dropdown in the top left show "Master" or "Adventureworks"?

If it shows "Master" or any db other than "Adventureworks", change it to "Adventureworks" and it should then see all the objects within that scope.

If no joy, and you have only just added Adventureworks, try rereshing the intellisense cache using CTRL+SHIFT+R or (Edit/Intellisense/Refresh local cache).

For other possibilities, check that you have all service packs and see
this link regarding Visual Studio and possible effect on intellisense

And this MSDN link on intellisense in MSSQL 2008R2
0
 

Author Comment

by:chaverly
Comment Utility
Yes, I tried all that. Thank you. I even uploaded SP1 for Visual Studio 2010. It works for my access database Xtreme that I change to a mdf, but not Adventureworks or Adventureworks LT. I even ran the regedit cmd to allow as public. I'm at a loss.
0
 
LVL 12

Expert Comment

by:Koen Van Wielink
Comment Utility
Also, this does not work either.

select a.customerid
from Sales.SalesOrderHeader  a

Do you mean that this query doesn't run, or just that you don't get intellisense?
If the query doesn't run, it probably means the issue is not with intellisense but with access to the database.
Does it work when you add the following line above the select statement:

USE AdventureWorks
Go

Open in new window


This assumes you named your database AdventureWorks. Change it to the proper name if you have to.
Also, the user under which you are logged in, what database role is assigned?
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 45

Expert Comment

by:Vitor Montalvão
Comment Utility
Try to press <CTRL+SPACE> when the intellisense isn't working.
0
 
LVL 18

Accepted Solution

by:
SimonAdept earned 500 total points
Comment Utility
One other gotcha.. I connect to various instances from SSMS. One of them is SQL2000 and intellisense doesn't work for queries on that connection. You would have installed Adventureworks to a MSSQL instance. Can you confirm that it is a 2008 instance? (It does sound like it is if you get ANY intellisense in that db).

e.g. at the bottom right of the query window, does it show [servername] (8.0 SP4) or [servername) (10.50 SP2) or something else?

The only other possibilities I know of are:
1. comment out any lines above your code - errors above the cursor can prevent it working
2. ensure SQLCMD mode is not enabled.
SQLCMD-mode.jpg
0
 

Author Closing Comment

by:chaverly
Comment Utility
Thank you, thank you!!
0
 
LVL 18

Expert Comment

by:SimonAdept
Comment Utility
Glad to help. Out of interest, which of the possibilities was it?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now