I'm trying to import data from an Excel file into Microsoft SQL Server 2019 Express Edition (64-bit) using the following query
USE DB1;
GO
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXEC sp_configure 'ad hoc distributed queries', 1
RECONFIGURE WITH OVERRIDE
GO
SELECT * INTO ContractHeader
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=D:\Users\User1\Downloads\Book1.xlsx', [Sheet1$]);
GO
However, when I run it, I'm getting the following error plus I then also need to start the SQL Service manually.
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Configuration option 'Ad Hoc Distributed Queries' changed from 1 to 1. Run the RECONFIGURE statement to install.Msg 109, Level 20, State 0, Line 8 > A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)