Troubleshooting Guide: Error 7222 – “Only a SQL Server provider is allowed on this instance”
Why This Error Happens
This error occurs when a linked server definition on SQL Server 2025 attempts to use a non-SQL Server OLE DB provider (such as Microsoft.ACE.OLEDB, MSDASQL, or an Oracle/PostgreSQL provider) while the instance is configured to restrict connections to SQL Server–to–SQL Server linked servers only. This typically happens due to a Policy-Based Management (PBM) policy, a security hardening configuration, or an Azure Arc-enabled governance setting that explicitly disables non-SQL providers at the instance or enterprise level. It can also surface after an in-place upgrade to SQL Server 2025, where legacy linked server configurations using deprecated providers are no longer permitted under the new default security baseline.
Step-by-Step Resolution Guide
Step 1: Identify the Offending Linked Server
- Open SQL Server Management Studio (SSMS) and connect to the instance.
- Run the following query to list all linked servers and their providers:
SELECT name, provider, product, data_source
FROM sys.servers
WHERE is_linked = 1;
- Confirm which linked server is using a non-SQL provider (e.g.,
MSDASQL,Microsoft.ACE.OLEDB.16.0).
Step 2: Check the Instance-Level Provider Restriction Policy
- Open SSMS → Object Explorer → expand Management → Policy Management → Policies.
- Look for a policy named similarly to
Restrict Linked Server ProvidersorSQL-Only Provider Enforcement. - If found, right-click and select Disable, or edit the policy condition to allow the required provider.
- Alternatively, check the registry for enterprise-enforced restrictions at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\Providers\RestrictToSQLOnly
- Set the value to
0if present, then restart the SQL Server service.
Step 3: Reconfigure or Remove the Non-Compliant Linked Server
- If provider restriction must remain enabled (recommended for security compliance), drop the non-SQL linked server:
EXEC sp_dropserver 'LinkedServerName', 'droplogins';
- Recreate the data connection using a supported SQL Server–to–SQL Server linked server, or migrate the integration to PolyBase or Linked Server with SQL Server Native Client 18+, which remain compliant.
Step 4: Restart SQL Server Services
- Open SQL Server Configuration Manager.
- Right-click SQL Server (MSSQLSERVER) → Restart to apply provider and policy changes.
- Confirm the SQL Server Agent service also restarts cleanly if linked server jobs depend on it.
Alternative or Verification Steps
- Re-run the linked server query (
EXEC sp_linkedservers;) and attempt a test connection viaSELECT * FROM OPENQUERY(LinkedServerName, 'SELECT 1')to confirm Error 7222 no longer appears. - If the restriction is mandated by organizational policy and cannot be disabled, use SQL Server Integration Services (SSIS) or Azure Data Factory as an alternative data-movement layer instead of a direct linked server connection.