views:

5851

answers:

8

I just installed SQL Server Express 2008 because of intellisense feature. It worked at first but than it stopped working. Looking for the option to check and later consulting Google I have found that it looks like Microsoft disabled intellisense if you connect to SQL Server 2005 databases.

Is this absolutely correct ?
Is there any solution for this (some registry "switch") ?

+5  A: 

I don;t think that there is a way around this (although I could be wrong) but this may help in your quest for the truth ;-)

Looks like intellisense was suggesting 'incorrect' syntax for pre-2008 databases during CTP and was removed in the RTM.

DilbertDave
Updated my answer with the 'root' link from Microsoft.
DilbertDave
A: 

Don't think of it so much that they disabled intellisense in SQL Server 2005 so much as that SQL Server 2005 wasn't built with intellisense support in mind; there is code in the SQL Server 2008 database engine that supports the intellisense feature in Management Studio 2008.

Yes, I know it seemed to work in the later CTP previews, but some googling (and DilbertDave's link) reveals that there were a number of ways in which the CTP behavior was broken.

Joel Coehoorn
A: 

Just use toad, waaaaay better than any Microsoft tool. There's a freeware version.

Toad Soft

Toad? Seriously? Ugh!
Joel Coehoorn
What's so bad about Toad?
Kev
Maybe nothing: it's been about 4 years since I last had to use it. But I have very ugly memories from that experience.
Joel Coehoorn
Yeah the first versions was horrible, try it again, it's very stable now.
but does it have intellisense?
Maslow
+2  A: 

A co-worker and I have both installed SQL Server Management Studio 2008 and we both connect to the same SQL Server 2005 and 2008 databases. He gets intellisense for both 2005 and 2008. I just get it for 2008. We cannot work out why this is.

CORRECTION: Turns out that my co-worker thought that he was connecting to a 2005 server but it was in fact a 2008 server.

Conclusion: After consulting with our DBA's it does not appear to be possible. They've also done extensive research on this.

Guy
+8  A: 

SQLPrompt by Red-Gate does the job quite nicely, across all versions (2000, 2005 and 2008), as well as operating inside VS and even some text editors.

Dave
+15  A: 

If you'd like to see the feature added, vote for the request on Connect. Here is feedback from the team regarding why it was dropped:

Let me share product team’s information about the version support of IntelliSense. This was a truly by-design from the beginning of IntelliSense project and it was a part of business decision. Implementation of IntelliSense requires a full fidelity of engine parser reconstruction in client side using managed code base. Support of multiple server versions means design and implementation of multiple versions of parsers and related infra in parallel. This multiplies time and cost to develop, test and support. At the same time, the core module is an important product base that enables not only IntelliSense feature but also other products including Upgrade Advisor to analyze scripts; in the long term, it is potentially any feature that needs syntactic and semantic understanding of Transact-SQL language.

In CTP5 and CTP6, IntelliSense had a known issue that it did not correctly check the server version so CTP users could connect any version of SQL Server with IntelliSense. While some users didn't notice it, IntelliSense was not correctly working as desired. The impact was that IntelliSense had a high potential to guide users to script incorrect Transact-SQL or to false-negatively indicate that a script has errors while it is perfectly valid in those versions.

Considering the number one goal of IntelliSense is to increase productivity of authoring complex query or stored procedure (or simply Transact-SQL scripts), this issue was regarded as a factor to decrease productivity which is a huge negative impact from a new feature.

In RC0, this known issue was corrected that IntelliSense checks the server version and provides its feature on supported version which is SQL Server 2008.

As a version one, IntelliSense is enabled on a subset of Transact-SQL language. It is because the large scope of work to implement lexer, parser, binder and script document object model in managed code for entire language scope. The product team is moving forward with a focus on expanding the language support scope.

I hope this information provides the background information at minimum why the target version was selected on SQL Server 2008 only.

Anyone using the RTM build should consider the CU1 (Cumulative Update 1) build available here as quite a few IntelliSense bugs were addressed.

Craig Nicholson
+3  A: 

there is code in the SQL Server 2008 database engine that supports the intellisense feature in Management Studio 2008.

No there isn't. You're entirely wrong, and should be slapped with a wet fish.

All it is doing is interrogating the various INFORMATION_SCHEMA virtual tables to do discovery. The reason they disabled it against prior versions is that theoretically it might encourage you to use a syntax that is only valid against 2005, but lots of people were using it with 100% success. Of course the real reason they disabled it is that it reduced one advantage of upgrading your servers to 2008 (which is where they make the real money).

According to the thread on Connect, they reproduced the server-side parsing engine on the client-side. The comment you quote is in fact mostly correct.
Rick
+1  A: 

You can use intellisense in DbOctopus - works with SQL Server 2005 and 2000 too. It's currently free, but only until 1st September 2009.

You can find it here:

http://www.cogin.com/dboctopus/