SQL Server Error 7222: “Only a SQL Server provider is allowed on this instance”

I was trying to set up a up a linked server from SQL Server to PostgreSQL when I got error Msg 7222, Level 16 “Only a SQL Server provider is allowed on this instance”.

The message is reasonably self explanatory, but it still didn’t tell me what it was about my instance that prevented it from being allowed.

It didn’t take long to find out.

The Reason for this Error

The reason I was getting this error is because I was using SQL Server for Linux.

As it turns out, there are a bunch of features that aren’t currently supported in SQL Server for Linux.

One of those unsupported features includes linked servers to data sources other than SQL Server.

Microsoft provides a list of unsupported features in SQL Server 2019 for Linux, and “linked servers to data sources other than SQL Server” is one of them.

Unsurprisingly, it’s also included in its list of unsupported features in SQL Server 2017 for Linux.

Hopefully this will change in future versions. In the meantime, you can still create linked servers to other instances of SQL Server.