Skip to content

Commit b900409

Browse files
authored
Remove ACE references and replace with JET as ACE is unsupported for such scenarios (#32751)
1 parent 15a68d2 commit b900409

1 file changed

Lines changed: 8 additions & 70 deletions

File tree

docs/relational-databases/import-export/import-data-from-excel-to-sql.md

Lines changed: 8 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To start learning how to build SSIS packages, see the tutorial [How to Create an
7474
> [!IMPORTANT]
7575
> In [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)], you can't import directly from Excel. You must first [export the data to a text (CSV) file](import-bulk-data-by-using-bulk-insert-or-openrowset-bulk-sql-server.md).
7676
77-
The ACE provider (formerly the Jet provider) that connects to Excel data sources is intended for interactive client-side use. If you use the ACE provider on [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], especially in automated processes or processes running in parallel, you might see unexpected results.
77+
The following examples use the JET provider, because the ACE provider included with Office that connects to Excel data sources is intended for interactive client-side use.
7878

7979
### Distributed queries
8080

@@ -100,8 +100,8 @@ The following code sample uses `OPENROWSET` to import the data from the Excel `S
100100
USE ImportFromExcel;
101101
GO
102102
SELECT * INTO Data_dq
103-
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
104-
'Excel 12.0; Database=C:\Temp\Data.xlsx', [Sheet1$]);
103+
FROM OPENROWSET('Microsoft.JET.OLEDB.4.0',
104+
'Excel 8.0; Database=C:\Temp\Data.xls', [Sheet1$]);
105105
GO
106106
```
107107

@@ -111,8 +111,8 @@ Here's the same example with `OPENDATASOURCE`.
111111
USE ImportFromExcel;
112112
GO
113113
SELECT * INTO Data_dq
114-
FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0',
115-
'Data Source=C:\Temp\Data.xlsx;Extended Properties=Excel 12.0')...[Sheet1$];
114+
FROM OPENDATASOURCE('Microsoft.JET.OLEDB.4.0',
115+
'Data Source=C:\Temp\Data.xls;Extended Properties=Excel 8.0')...[Sheet1$];
116116
GO
117117
```
118118

@@ -154,9 +154,9 @@ DECLARE @catalog NVARCHAR(128);
154154
-- Set parameter values
155155
SET @server = 'EXCELLINK';
156156
SET @srvproduct = 'Excel';
157-
SET @provider = 'Microsoft.ACE.OLEDB.12.0';
158-
SET @datasrc = 'C:\Temp\Data.xlsx';
159-
SET @provstr = 'Excel 12.0';
157+
SET @provider = 'Microsoft.JET.OLEDB.4.0';
158+
SET @datasrc = 'C:\Temp\Data.xls';
159+
SET @provstr = 'Excel 8.0';
160160

161161
EXEC @RC = [master].[dbo].[sp_addlinkedserver] @server,
162162
@srvproduct,
@@ -266,68 +266,6 @@ To start learning how to copy data with Azure data factory, see the following ar
266266
- [Move data by using Copy Activity](/azure/data-factory/data-factory-data-movement-activities)
267267
- [Tutorial: Create a pipeline with Copy Activity using Azure portal](/azure/data-factory/data-factory-copy-data-from-azure-blob-storage-to-sql-database)
268268

269-
## Common errors
270-
271-
#### Microsoft.ACE.OLEDB.12.0" hasn't been registered
272-
273-
This error occurs because the OLEDB provider isn't installed. Install it from [Microsoft Access Database Engine 2016 Redistributable](https://www.microsoft.com/download/details.aspx?id=54920). Be sure to install the 64-bit version if Windows and [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] are both 64-bit.
274-
275-
The full error is:
276-
277-
```output
278-
Msg 7403, Level 16, State 1, Line 3
279-
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.
280-
```
281-
282-
#### Can't create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
283-
284-
This error indicates that the Microsoft OLEDB wasn't configured properly. To resolve this issue, run the following Transact-SQL code:
285-
286-
```sql
287-
EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1;
288-
EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1;
289-
```
290-
291-
The full error is:
292-
293-
```output
294-
Msg 7302, Level 16, State 1, Line 3
295-
Cannot create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
296-
```
297-
298-
#### The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" can't be loaded in-process on a 64-bit SQL Server
299-
300-
This error occurs when a 32-bit version of the OLD DB provider is installed with a 64-bit [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]. To resolve this issue, uninstall the 32-bit version and install the 64-bit version of the OLE DB provider instead.
301-
302-
The full error is:
303-
304-
```output
305-
Msg 7438, Level 16, State 1, Line 3
306-
The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.
307-
```
308-
309-
#### The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error
310-
311-
This error typically indicates a permissions issue between the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] process and the file. Ensure that the account that is running the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service has full access permission to the file. We recommend against trying to import files from the desktop.
312-
313-
The full error is:
314-
315-
```output
316-
Msg 7399, Level 16, State 1, Line 3
317-
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
318-
```
319-
320-
#### Can't initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
321-
322-
This error typically indicates a permissions issue between the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] process and the file. Ensure that the account that is running the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service has full access permission to the file. We recommend against trying to import files from the desktop.
323-
324-
The full error is:
325-
326-
```output
327-
Msg 7303, Level 16, State 1, Line 3
328-
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
329-
```
330-
331269
## Related content
332270

333271
- [Get started with this simple example of the Import and Export Wizard](../../integration-services/import-export-data/get-started-with-this-simple-example-of-the-import-and-export-wizard.md)

0 commit comments

Comments
 (0)