SQL Server Management Studio 2008 R2 Developer Edition intellisense not working - sql-server

I installed Developer edition of SQL Server 2008 R2 and find out intellisense is not working or show as other developer talking about.
Is there anything else I need to do to get intellisense working in 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.
a) Press CTRL+SHIFT+R b) Go to Edit >>
IntelliSense >> Refresh Local Cache
Full list of things to make sure of:
Connected to SQL Server 2008 edition
Intellisense enabled
Intellisense refreshed
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. Microsoft has confirmed that VS 2010 SP1 effectively breaks intellisense in SQL Management Studio.
Here are a couple of options you can try:
DevArt's SQL Complete -$0 free
RedGate's SQL Prompt - $195 <-You can find it at 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.
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
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.
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.
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.
Other reading:
http://www.techrepublic.com/blog/datacenter/using-intellisense-in-sql-server-2008/446
http://blog.sqlauthority.com/2009/03/31/sql-server-2008-intellisense-does-not-work-enable-intellisense/

You also need to be talking to at least a 2008 server.

Related

SQL Server Compare Schema in Visual Studio 2017

I am attempting to compare schemas of two databases on the same server.
The two databases are named benchmarkdb and benchmarkdb_dev.
In Visual Studio 2017, I go to Tools > SQL Server > New Schema Compare...
From both drop down menus labeled "Select Source" and "Select Target" (as seen in the picture below), I want to select benchmarkdb as source and bencmarkdb_dev as target.
After clicking to select a source, the "Select Source Schema" pops up, and I clicked the "Select Connection..." button, which brought another popup. The newest popup (the one on the right in the picture below) shows both databases I am trying to compare.
However, after I choose one for either the source or the target, all pop ups close, but nothing populates the "Select Source..." or "Select Target..." drop down menus. In fact, it just goes back to looking like the first picture.
Is there a solution to this so I can compare the schemas between the databases?
Update:
I have tried this on VS 2012, 2015, and 2017. All are facing the same issue. VS software and system software are up to date. Below are some versions of software that I am using, if it is any help.
Windows 7 Enterprise SP1
VS 2012, 2015, and 2017
SQL Server 2014
.NET Framework v4.7.02053
OK, so I managed to fix it.
First off, you need to install SSDT from Microsoft pages. Just google it.
Make sure that you also have it listed in individual components when starting Installer (on Modify). Only SQL Server Database is required (I could choose from Integration Services and 3 more).
Next, you need to "Remove connection from history" in Schema Compare modal for connection selection.
I closed VS at this point, to make sure that the connection is not in history anymore.
Starting VS the next time, you should not have the problematic connection in history.
Recreate the connection (I checked "remember password") and voila. Schema compare works.
Not really sure, but in desperation I also installed "Redgate ReadyRoll Core", "Redgate SQL Prompt Core" and "Redgate SQL Search".
I don't think it matters, but if all else fails...
Edit: This worked on 2 machines and it doesn't seem to be connected to VS version.
I had the same issue, but I don't know if I had the same root cause.
My problems started after changing my database from SQL Server on a Window Server to SQL Server on a Linux Container. The schema compare would appear to accept my selection but the database field would never actually populate and I could not perform a comparison.
There were 2 things I had to do to solve the problem.
Update Visual Studio (using the standard updater within Visual Studio).
Update the SQL Server Development Tools (SSDT) add-on for Visual Studio to a preview version that supports SQL Server on Linux. That download is available here.
After both updates were in place I could select the database and execute Schema Comparisons between my project and SQL Server on Linux exactly as I had been doing for SQL Server on Windows.
If running a local database, check what version of SQL Management studio you are using
I had the same issue running Visual Studio Pro 2017 and SQL management studio v18.6 with SQL Server 2017 installed.
I tried all of the above solutions and no luck
Even going back to Visual Studio 2015 didn't work for me. What did work though was changing back to SQL Management Studio v17.9.1
No issues any more.
I may try to upgrade Visual Studio to 2017 again to see if that works now

Intellisense is not working in SQL Server 2014

Intellisense is not working in Microsoft SQL Server 2014, it was working fine in Microsoft SQL Server 2012 but once I installed 2014 it is not working.
Under Tools -> Options -> Text Editor -> Transact-SQL -> IntelliSense it says it is enabled there.
I have also tried refeshing the IntelliSense cache with Ctrl-Shft-R but that doesn't work.
From my personal experience, SSMS IntelliSense is a pure crap, sometimes it works, sometimes it doesn't. I'd go for third party tools.
If you're willing to spend your cash, I'd recommend Redgate SQL Prompt.
If you need a free product, try dbForge SQL Complete, it's not as good as SQL Prompt, but does a decent job.
Perform following steps:
Under Edit -> IntelliSense -> Refresh Local Cache
Restart SSMS.Then try
After Refreshing local cache, if still not working, then try to delete temporary file of OS. for me it's work, I hope this will fix your's issue as well.
I am with SQL Server Management Studio 2014 and this working "Just hit Ctrl+Shift+R to force SSMS to refresh its cache." – Panagiotis Kanavos

Index GUI Issues with SSMS 2014 and 2016 when working with SQL Server 2005

We currently work with all versions of SQL Server from 2005 onwards. To save time I try to do everything in a single version of Management Studio. This also helps if running newer client operating systems like Windows 10 which old client tools aren't compatible with.
Specifically when trying to view the graphical SSMS interface for index properties I get the following error if connected to a SQL Server 2005 instance.
In Object Explorer:
Database > Table > Indexes > Right Click > Properties
Full error text:
TITLE: Microsoft SQL Server Management Studio
Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
Cannot read property IsSparse. This property is not available on SQL Server 2005. (Microsoft.SqlServer.Smo)
This also happens in SSMS 2014, but not SSMS 2012.
So my question is; can something be done to work around this issue allowing one version of management studio to be used for all versions of SQL Server from 2005 onwards?
I'm guessing now, but as it works in SSMS 2012 there must be something going on that targets an older version of mscorlib. Maybe because SSMS 2012 uses a VS2010 shell and different .Net framework?
Many thanks in advance for your time.
There is an Active feedback about that on Microsoft Connect here. Someone suggest a workaround to go into Table Design and go to menu "Indexes/Keys...". It works, but some properties are not editable that way, like Included Columns. The other options left are to use SSMS 2005-2012 or use T-SQL script, like Aaron said.

Missing Diagram folder in Database Explorer at Visual Studio 2012

I was in a middle of designing a website when suddenly Database Diagram folder just disappeared from the Database Explorer. I have no idea what happened and what to do right now, as I desperately need it to continue my work - adding tables to database manually are not an option for me.
I've been seeking for the solution for a whole day, and I even re-installed the Visual Studio and local IIS server, but it wasn't helpfull at all.
Is there any way to bring the feature back or at least is there any free tool that would work on Windows 8 x64 and has diagram-based database designer for MSSQL 2008?
EDIT
It seems that Microsoft removed the diagramming for purpose. Which is pretty logical in a business logic - why would somebody buy Server Management Studio if they have basic tool (diagramming) built in Visual Studio?
1) Database Diagram is a feature of SQL Server, not Visual Studio. I am not sure what VS uses to display that folder but you might want to verify with your DBA or check the configuration of the database to see if someone has not just disabled the ability to use diagrams. Have you tried refreshing your connection to the database server as well?
2) How is adding tables to a database manually not an option? If you get yourself dependent on doing things one way and only that one way you are setting yourself up for disaster in future projects, as you are in your current one. There are other ways from within VS to create a table, it just may not be a graphical picture that diagrams offers.
3) Have you looked at the database through SSMS to see if the diagrams folder shows up there?
Hello this has been my solution that worked for me and enabled me to use database diagram ide in visual studio 2012!!
First i installed SQL Server Management Studio. I then noticed that i still did not have SQLEXPRESS Service or SQL Agent Browser in my computer services either.. This was why i assume i couldn't login to any of the SSMS which was annoying. I then downloaded SQL Server Express R2 which then ran me though another setup which was fine. I did also choose to put a sql server password for SQL Server Express.
Once installed I double checked to make sure the services where running by right clicking MY COMPUTER / MANAGE / SERVICES -- scroll down till you see "SQL Server (SQLEXPRESS)" and make sure that the service has started and also "SQL Server Agent (SQLEXPRESS)" (this one was turned off when i checked) .. i was then able to login to SSMS without a problem.
I then created a new database, right clicked diagram like we always do in VS and created a diagram with two tables, created their relationships blah blah..
i then created a new website in vs 2012, i clicked "Connect To Database" in the SERVER EXPLORER"
I choose my server name, used windows authenication and selected the database i just created in SSMS.
Then to my suprise i now have database diagram designing in Visual Studio 2012.. Finally!
Thankyou microsoft for removing such a cool feature which now gives us developers a few things to do.
Hope this helps.

Scripting tables from Sql 2008 Mgmt Studio

I use the Sql Server Mgmt Studio to script the creation of our database and all entities. Recently we migrated from SQL Server 2005 to SQL Server 2008 and I'm now using the 2008 version of Mgmt Studio.
I'm noticing some small but annoying differences in its scripting support that are making it really hard for me to diff my existing 2005 scripts with new ones created in 2008.
Some of the problems I'm encountering are the tables being ordered in some indeterminate order (not alphabetical), and extra linefeeds after every GO command.
Does anyone know how to make the 2008 version of Mgmt Studio script the same as the 2005 version?
An added note, I've found that if I use the multiselect feature of the Object Explorer Details window I can get consistent ordering of tables in the resulting script, but if I use the Generate Script wizard I do not. The wizard only seems to change the order when I make schema changes, but it makes diff'ing changes much harder. Surely others are seeing this problem?
If you go to Tools -> Options, open the "SQL Server Object Explorer" node and then select the "Scripting" node, there are several options to alter the way that scripts are generated, including "Script for server version" which can be set to "SQL Server 2005".

Resources