SSMS : IntelliSense does not recognize synonyms - by AaronBertrand

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 331633 Comments
Status Closed Workarounds
Type Bug Repros 27
Opened 3/5/2008 1:53:26 PM
Access Restriction Public


When using synonyms, I would expect the base object to be recognized by IntelliSense.  Not only are the columns etc. not available in the autocomplete list, but the synonym itself is underlined with a red squiggly (Invalid object name) even though the query runs.
Sign in to post a comment.
Posted by cat_ca on 11/29/2012 at 12:03 PM
hi there ,for Microsoft SQL Server 2008 R2 (RTM) - 10.50.1777.0 (X64) ,
the intelliSense still doesn't work for synonyms.. any updates?
Posted by Karl Shifflett (kdawg) on 5/30/2012 at 11:47 AM
I've opened a new bug here:

I've been in contact with the SQL Server Team, they are aware of this issue and the number of votes it has received.

Posted by Karl Shifflett (kdawg) on 5/30/2012 at 7:44 AM
After installing the CU 6 I still have issues resolving the Synonyms in the Query Editor.

CREATE SYNONYM dbo.Contact FOR Contact.Contact

SELECT * FROM dbo.Contact <----- dbo.Contact has red squiggles under it.

If I run the query, it works, but the editor gives me red squiggles and which provides a less that idea editing experience.

If I change the select statement to: SELECT * FROM Contact.Contact, then everything works as expected: no squiggles and I get IntelliSense.

Here is the query result from SELECT @@VERSION

Microsoft SQL Server 2008 R2 (SP1) - 10.50.2811.0 (X64)

Apr 6 2012 01:59:29

Copyright (c) Microsoft Corporation

Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

This is the about dialog information on my SQL Server computer:

Microsoft SQL Server Management Studio 10.50.2811.0

Microsoft Analysis Services Client Tools 10.50.2811.0

Microsoft Data Access Components (MDAC) 6.1.7601.17514

Microsoft MSXML 3.0 6.0

Microsoft Internet Explorer 9.0.8112.16421

Microsoft .NET Framework 2.0.50727.5448

Operating System 6.1.7601

I’ve tried everything I’ve read, but can’t get this working.

Thank you for your assistance,


Cheers, Karl -
Posted by g00p2k on 1/26/2012 at 12:02 PM
I'm on Microsoft SQL Server 2008 R2 (RTM) - 10.50.1777.0 (X64)

Synonyms have never worked for me with intellisense. Is this truly a fixed issue? I sure wish it would work, would help tremendously when writing queries.
Posted by Valentino Vranken on 1/18/2012 at 1:35 PM
Good news: I can confirm it's working fine in SQL Server 2012 RC0!
Posted by Heebr on 10/14/2011 at 1:27 AM
In 2008 R2 SP1 it is not fixed either. Will there be a solution for 2008 R2 SP1?
Posted by Microsoft on 8/23/2011 at 1:01 AM
We are confirming that this defect has been fixed, and the fix will be made available in the next next public iteration following CTP3. This fix could not be made in time for the CTP3 refresh.
Posted by AaronBertrand on 8/15/2011 at 6:50 PM
This was marked as closed / fixed, but without any explanation (and without any evidence in Denali CTP3 or in 2008 R2 SP1 that it has, in fact, been fixed). I've re-opened the item hopefully to trigger some kind of comment from Microsoft, who have been silent on this issue since last April (aside from marking it as fixed, of course).
Posted by Carl Daniel on 7/31/2011 at 8:49 AM
Where is this fixed? It appears unchanged in SQL 2008 R2 SP1.
Posted by Carl Daniel on 6/3/2011 at 9:32 AM
This has been affecting me for the past year as well. In my case, 100% of my synonyms refer to tables in other databases on the same instance - this is a case that I could expect to be 100% supported by Intellisense. The queries, of course, run just fine.
Posted by Saffy on 5/5/2011 at 3:09 AM
Well, this thread is depressingly quiet !
My synonyms point to a 3rd party database within the same sql instance, so this shouldn't be a big ask.

On the subject, the "Casing for built-in function names" option doesn't work for me.
I don't go for DATEADD or dateadd but DateAdd which is more readable and is closer to standards in .net code.
A title case option would therefore be very welcome.
Posted by Michael J. Swart on 4/13/2011 at 5:53 AM
Will you?
Posted by Microsoft on 4/27/2010 at 3:28 PM
We are looking into this issue as part of upcoming releases. We'll keep this thread updated with relevant info.
Posted by Pithecanthropus on 1/31/2010 at 3:44 PM
Some further details...

I found that if I use an attribute list in the SELECT clause, I see the same kind of error message--squiggly red line and "Invalid Object Name" on mouse hover. But the query still does run.
Posted by Pithecanthropus on 1/31/2010 at 3:41 PM
SS 2008, I'm getting a similar error with a view that I built myself. It runs, but Intellisense says the view name is an invalid object name.
Posted by JohnDauber on 1/20/2009 at 2:34 PM
I take it this is still open. I searched all over to see if I was doing something wrong to access my synonyms with intellisense. I all could find were things listing how great either of the 2 were not that they didn't work together. Not sure how a bug this big could be missed. I would have thought this would be fixed by now.
Posted by DWalker on 4/18/2008 at 11:53 AM
When this is implemented, it would be great if "List Members" could include synonyms as well as table and view names.
Posted by Microsoft on 3/13/2008 at 5:00 PM
Hi Aaron,

Synonym is not supported language in the version one. We will investigate and try to mute the false error reporting on this case.

Eric Kang
SQL Server Program Manager
Posted by DWalker on 3/9/2008 at 12:57 PM
Oops -- in my case, the synonym itself is not underlined with a red squiggly, but the column names in the FROM clause which select columns from that synonym, are underlined with a red squiggly. February 2008 CTP.
Posted by DWalker on 3/9/2008 at 12:55 PM
Yes, this affects me too. In my case, synonyms often point to a table or a view in a linked SQL server database. I understand that SQL server 2008's intellisense might not know the fields in the remote table, but it should NOT insist that the field names we supply are incorrect. It would be better to ignore them instead of incorrectly claiming that they are wrong.