Linked server connections shows error: Invalid column name 'generated_always_type'.

Hi all,

This is my first time trying LinqPad with a Linked Server connection.

  • The "Master" server is Microsoft SQL Server Express (64-bit) version 14.0.2037 running on Windows Server 2019 Datacenter (10.0)
  • The "Linked" server is Microsoft SQL Server Standard (64-bit) version 12.0.6433.1 running on Microsoft Windows NT 6.3 (9600)
  • On the "Master" server, I have created a Linked Server object to the "Linked" server.
  • For testing purposes, I'm connecting to both servers using SQL Authentication.
  • The choice of which server would be "Master" or "Linked" was arbitrary. I don't know if this may have an impact.
  • Querying from SSMS works, except that I found that the collation is different. The Master is Latin1_General_CI_AS, and the Linked is French_CI_AS. I do not have sufficient rights to change the collation on either DB, and I already know what the DBA's answer will be :|

Now, on the LinqPad side, I'm using version 6.12.4 (X64), Premium Edition. Connections to individual servers work just fine.

I create the linked connection as if creating a connection to the Master, and then checking the Include additional databases checkbox. I then select the "Linked" DB from the bottom half of the Additional Databases dialog.

The Test button reports that the connection is successful. So far so good.

The first thing I noticed is that the connection icon has a small red X overlaid, and the name of the connection is:

srv1.DB1 + srv2.DB2 - Error: Invalid column name 'generated_always_type'.

which doesn't look good already.

So far, everything I've tried as C# Expression has had a yellow stripe at the top of the window query after execution, saying "Invalid column name 'generated_always_type'."

On the other hand, switching to SQL Language, I can run simple queries such as:

select * from [srv2].[DB2].[dbo].[tblFoo]

And get the expected results.

I've searched for any possible known problem with LinqPad regarding this 'generated_always_type' column, but didn't find anything relevant.

Any takers?


  • Thanks for the detailed report. This bug is triggered by the main server being V14 (which supports generated_always_type) and the linked server being V12 (which does not).

    I've just released a new beta which uses the openquery statement to ensure that the version queries execute separately on each linked server. This should fix the problem.


    Let me know how you get on.

Sign In or Register to comment.