Search

Microsoft.ACE.OLEDB.12.0 provider will allow update to local Excel spreadsheet but not using UNC path by TTT-Tom

Active

1
0
Sign in
to vote
Type: Bug
ID: 651396
Opened: 3/14/2011 3:46:50 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
We have a server with Windows 2003 x64 Standard running SQL Server 2008 Standard with SP2 (10.0.4000) and a test system running on Windows 2003 Standard running SQL Server 2008 Developer with SP2 (10.0.4000).

The databases/server on the x64 platform is production, and the ones on the x86 platform are for development and QA. The databases are exactly the same once a production push occurs; thus, the databases are out of sync for development, and are sured up once a push occurs.

We have installed the Microsoft Access Database Engine 2010 Redistributable download on each server. The x64 drivers on the x64 box, and the x32 drivers on x86 box.

Our problem: We have a job that creates a set of data within a SQL Server table. Once that is finished, we have a SQL script that copies our Excel spreadsheet template created by the users to a shared drive and updates the spreadsheet. Inside the script that updates the spreadsheet, it draws the data from the SQL Server database table into a temporary table and then, it updates the Excel spreadsheet from the temporary table.

Our statement that updates the Excel spreadsheet, which runs successfully, on the x86 platform follows:

UPDATE a
SET F1=ReportDetailTypeDisplayName,
F2=OutputValue,
F3=OutputValue1,
F4=OutputValue2,
F5=OutputValue3,
F6=OutputValue4,
F7=OutputValue5,
F8=OutputValue6,
F9=OutputValue7,
F10=OutputValue8,
F11=OutputValue9,
F12=OutputValue10,
F13=OutputValue11
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 8.0;HDR=No;DATABASE=\\zeus\TestOutput\20110310\20110310_Pembroke.xls',
'Select * from [Sheet1$]') AS a
INNER JOIN #t AS rptr ON CAST(a.F1 AS VARCHAR(200)) = CAST(rptr.[Sequence] AS VARCHAR(200)) + 'a'
WHERE rptr.PullID = 52427
--AND rptr.[Sequence] <= 3

It fails with the following error on the x64 platform:

Msg 7399, Level 16, State 1, Line 34
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.
Msg 7303, Level 16, State 1, Line 34
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".

The share \\zeus\TestOutput\ and drive directory have Full Control given to "Everyone" and "Guests".

Now, if one copies the Excel spreadsheet to the local hard disk, directory c:\temp, of the x64 SQL Server, and change the update to:

UPDATE a
SET F1=ReportDetailTypeDisplayName,
F2=OutputValue,
F3=OutputValue1,
F4=OutputValue2,
F5=OutputValue3,
F6=OutputValue4,
F7=OutputValue5,
F8=OutputValue6,
F9=OutputValue7,
F10=OutputValue8,
F11=OutputValue9,
F12=OutputValue10,
F13=OutputValue11
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 8.0;HDR=No;DATABASE=C:\temp\20110310_Pembroke.xls',
'Select * from [Sheet1$]') AS a
INNER JOIN #t AS rptr ON CAST(a.F1 AS VARCHAR(200)) = CAST(rptr.[Sequence] AS VARCHAR(200)) + 'a'
WHERE rptr.PullID = 52427
--AND rptr.[Sequence] <= 3

It is successful with the message:

(298 row(s) affected)


Could you investigate the issue here? Is this a bug in the "Microsoft.ACE.OLEDB.12.0" driver for Excel on 64-bit?
Details (expand)
Product Language
English

Version

SQL Server 2008 - Standard Edition

Category

SQL Engine

Operating System

Other
Operating System Language
US English
Steps to Reproduce
1. create an 2003 Excel spreadsheet
2. in col 1, row 1, put '1a', col1, row2, put '2a', and so forth
3. create a share on computer other than the SQL Server on some network
4. give the share and directory Full Control to Everyone and Guests
5. copy the spreadsheet created in #1 above to the share created in #4. if you cannot copy the file, set the permissions so you can
6. on a box running Windows 2003 Standard with a SQL Server 2008 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, attempt to update spreadsheet from Microsoft SQL Server Management Studio using an UNC path
7. on a box running Windows 2003 x64 Standard with a SQL Server 2008 x64 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, attempt to update spreadsheet from Microsoft SQL Server Management Studio using an UNC path

This should generate an error...
8. copy the Excel spreadsheet to the Windows 2003 x64 box running SQL Server x64 to a local directory such as C:\temp
9. adjust your SQL statement to point to the local spreadsheet, and re-execute. This should be successfull
Actual Results
1. on a box running Windows 2003 Standard with a SQL Server 2008 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, the update to the Excel spreadsheet with an UNC path will be successful

2. on a box running Windows 2003 x64 Standard with a SQL Server 2008 x64 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, the update will fail with an UNC path

3. on a box running Windows 2003 x64 Standard with a SQL Server 2008 x64 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, the update to a Excel spreadsheet with a local path will be successfull
Expected Results
On a box running Windows 2003 x64 Standard with a SQL Server 2008 x64 with SP2 and the Microsoft Access Database Engine 2010 Redistributable installed on it, the update to the Excel spreadsheet using an UNC path will be successful. Thus, the same statement running on SQL Server 2008 and SQL Server 2008 x64 will return the same results.

Platform

X64
File Attachments
0 attachments
Sign in to post a comment.
Posted by Fred DevByte on 7/14/2011 at 10:05 AM
We are having the exact same issue, we are using the 64 bit driver on a 64 bit server. We can write to the local hard drive just fine, but not a UNC path.

Is there a resolution for this?
Posted by Microsoft on 3/24/2011 at 4:01 PM
Hi,

Thank you for reporting the issue. We will go over the repro steps, investigate the issue and update you when we have further information.

Thanks & Regards,
Pooja Harjani
Program Manager
Sign in to post a workaround.