We previously used the Microsoft Access Database Engine 2016 (ACE) provider. As this product is now deprecated, we have moved to Microsoft 365 Apps and are using the Microsoft.ACE.OLEDB.16.0 and Microsoft.ACE.OLEDB.12.0 providers.
Linked server creation and connectivity tests completed successfully. However, when querying Excel metadata using sys.sp_tables_ex, SQL Server fails with the following error:
A transport-level error has occurred when receiving results from the server.
(provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
This suggests that the connection is established correctly, but the failure occurs when SQL Server attempts to retrieve schema information from the Excel workbook.
Just wondering has anyone experience this before or has any experience/advice/suggestions on this topic...could it be a setting somewhere possibly?
Any assistance greatly appreciated...
J.
Typical code snippet (please note this predates my involvement)![]()
declare @tmp table (table_cat nvarchar(10), table_schem nvarchar(10), table_name varchar(max),
table_type nvarchar(10), remarks nvarchar(10))
Declare @lls_name varchar(max)
set @lls_name='ExcelLnkdServr_' +convert(varchar(30),getDate(),126)
begin try
insert into @tmp
exec sp_tables_ex @table_server =@lls_name
end try
begin catch
--etc...
end catch