Excel Linked Server Permissions Issue

Posted on 2006-05-16
Last Modified: 2008-01-09
I am running an SQL server where all users connect using NT Security.

I have created a Linked Server to an excel spreadsheet.

This works perfectly for any user who is part of the machine administrators group.
This fails for everyone else.

It is not permissions to the file. I have tested that.

Any help that would allow me to fix this problem would be greatly appreciated.

Regards, James Mayfield
Question by:JamesMayfield
    LVL 30

    Accepted Solution

    Most likely the user doesn't actually have access to the Excel driver. What is the error message?

    Try running FileMon ( on the server. It will tell you all the file access that is going on.

    You'll probably find that the user is effectively trying to access an Excel driver in a windows folder.
    LVL 2

    Author Comment

    It isn't a file access issue to do with the excel file, as the excel file can be opened by this user using other means.

    The error is.....

    Server: Msg 7399, Level 16, State 1, Line 1
    OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.  
    [OLE/DB provider returned message: Unspecified error]
    OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005:   ].

    Will the filemon utility tell me anything useful about the user having access to the Excel Driver? (This is just the Jet ODBC drive.)

    LVL 30

    Expert Comment

    Its the actual driver file (i.e. ODBCJT32.DLL) that might be the access issue.

    If that is the issue Filemon will indicate that access was deined on that particular file when you capture the access. I know its a pain having to use another tool to troubleshoot but Filemon comes in very handy for lots of other things as well.

    Actually it might be quicker to find the ODBCJT32.DLL file on the server and see if either user can open that directly too.
    LVL 2

    Author Comment


    It wasn't actually the ODBC driver at all.

    Would you believe.....

    What was causing the issue, was the fact that SQL Server, when creating the ODBC connection to an excel file, creates a file in the TEMP folder of the user that is running SQL server. If the user does not have permissions to that folder (in my case, this was c:\documents and settings\mysqloperationsdomainaccount\local settings\temp), then it fails.

    Filemon let me trace what happened when I successfully opened the file, then trace back to look for what failed when the user tried the operation.

    I have now moved the system users temp folder to a different location (requires a reboot to take effect), and gave my user permissions on that folder.

    Thanks heaps for the quick response and the useful tip. It was an EXCELLENT help.
    LVL 30

    Expert Comment

    Fantastic. Once again that Filemon program proves it's worth a million bucks!
    LVL 2

    Author Comment

    I'm glad it didn't cost me that though!!! That's more than my entire annual IT budget!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now