Solved

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

Posted on 2014-11-23
7
260 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 49

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 500 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
TSQL recursive CTE challenge... 8 36
How can I find this data? 3 31
Applying Roles in Common Scenarios 3 22
MSSQL Convert Char to Date Time 5 15
I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 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