open rowset (excel)

  • I am attempting to access the data in a spreadsheet which is located on another machine (in this instance a server). I have tried using the following T-SQL:

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=\\server_name\user_area\a_folder\a_file.xls', Sheet1$)

    but i get the following error message:

    Server: Msg 7399, Level 16, State 1, Line 1

    OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.

    OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

    How can i query a spreadsheet that isn't located on the database server? I can confirm that the file in question can be accessed from the db server by using windows explorer.

  • The error is an access denied/permissions error. Is sql running under system account or domain account? If system account, I believe you cannot access files across network, if domain account does it have access to the file.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • It is running under the system account. What is the minimum level of privileges that the domain account can be run under? Does the server have to be restarted? Will it affect the way SQL server manages NT authentication?

  • quote:


    It is running under the system account. What is the minimum level of privileges that the domain account can be run under?


    Outlined here (although you should just let EM do most of this for you):

    http://support.microsoft.com/default.aspx?id=283811

    quote:


    Does the server have to be restarted?


    SQL Server service, yes. Not the server OS.

    quote:


    Will it affect the way SQL server manages NT authentication?


    No.

    --Jonathan



    --Jonathan

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply