Solved

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

Posted on 2014-11-23
7
245 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: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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 47

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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