Problems accessing a csv file via linked server

  • On a SQL server (2000), I have a linked server connection to a csv file located on the same server. I followed the Books On-line topic and set the linked server connection up this way:

    --Create a linked server

    EXEC sp_addlinkedserver CSVImport, 'Jet 4.0',

    'Microsoft.Jet.OLEDB.4.0',

    'c:\csv',

    NULL,

    'Text'

    GO

    --Set up login mappings

    EXEC sp_addlinkedsrvlogin CSVImport, FALSE, NULL, Admin, NULL

    As you can see from the linked server login, I used the NULL option to specify the local user because I wanted all users to be able to connect to this text file.

    If I am sitting at the SQL Server, everything works fine. I can list the csv file in the directory and query its data. However, if I connect to that SQL Server from another computer, using the Query Analyzer for instance, I can not seem to connect to the csv file. When I try to execute the sp to list the linked server tables, I get the following:

    --Query

    DBCC TRACEON (7300, 3604)

    EXEC sp_tables_ex CSVImport

    --Result

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Server: Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 20

    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: ].

    So far I haven't been able to determine what this means. I would appreciate any advice you all might be able to offer.

    Thanks,

    Cliff Norris

    Database Administrator

    Alston & Bird, LLP

    Atlanta, GA


    Cliff Norris
    Database Administrator
    Alston & Bird, LLP
    Atlanta, GA

  • Hi,

    I'm facing similar problem. Did you find any solution?

     

     

  • Hi,

    I am also facing the same kind of a problem. Could anyone please shed some light to it.

    Thanks.

  • Instead of creating a linked server and using that to access the csv file can you try with the opendatasource and check if you are able to read the data from the file.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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