?
Solved

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

Posted on 2014-11-23
7
Medium Priority
?
302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40460962
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
ID: 40461154
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 13

Expert Comment

by:Koen Van Wielink
ID: 40461238
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
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 51

Expert Comment

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

Accepted Solution

by:
Simon earned 2000 total points
ID: 40461979
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
ID: 40463122
Thank you, thank you!!
0
 
LVL 18

Expert Comment

by:Simon
ID: 40463193
Glad to help. Out of interest, which of the possibilities was it?
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

765 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