Remote Folder in Linked Server

  • Hello all :

    I am working with a linked server created and destroyed on the fly in order to access dbf files in that way :

    set @prov='Driver={Microsoft Visual FoxPro Driver};SourceDB=D:\descarga\00005\;SourceType=DBF;NULL'

    EXEC master..sp_addlinkedserver 'IMPORT','','MSDASQL',null,null,@prov

    Select * from OPENQUERY (IMPORT,"Select campo1,campo2 from archivo order by campo1")

    ......

    ......

    exec master..sp_dropserver 'IMPORT'

    This works ok . The folder "D:\descarga\00005" is local to sql server

    If I change the folder to "F:\descarga\00005" where F:\ is a mapped drive in other machine then I get the next error :

    OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver] file 'clientes.dbf' does not exists..

    The mapped drive F:\ have all rights for "all"

    Please, why can I connect the linked server to files in a mapped drive?

    Thanks in advance.

    Jesús.

  • What account is sql server running under. If it is set to localsystem then you will not be able to access across a network.

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

  • The sqlserver services are running under Administrator account of the machine, not under LocalSystem account.

    Thanks.

    Jesús.

  • Are you sure the mapped drive exists, you will get this error if not.

    Test with

    xp_cmdshell 'dir F:\descarga\00005\'

    Alternatively use UNC

    Edited by - davidburrows on 11/07/2003 05:59:28 AM

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

  • If I run xp_cmdshell 'dir F:\descarga\00005\' the I get the error "Drive is not ready" but the drive exists.

    If I run xp_cmdshell 'dir \\SERVER\SHAREDFOLDER\descarga\00005\' the I get the error "Error de inicio de sesión: nombre de usuario desconocido o contraseña incorrecta" that in a bad translation means "login unknown or wrong password"

    How can I solve this?

    Thanks again

  • ...Administrator account of the machine.../code]

    I suspect that there is a permission/access problem to do with the local Administrator account. Did you login as Administrator to create the mapped drive? Was the mapped drive created using a specific account other than Administrator? Make sure the Administrator account is given sufficient permissions the the share.

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

  • In the windows explorer, the mapped drive works fine. I (logged as Administrator) can copy, paste, delete both files and folders in this drive.

    Does it mean that the drive is correctly configured or I need another kind of permissions?

    Thanks again.

    Jesús.

  • It would seem that permissions are OK. "login unknown or wrong password" would indicate that sql is using the wrong credentials. Has someone changed the Adminstrator password since sql was last reloaded? I would reset the account and password for sql server service and stop/start it if possible.

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

Viewing 8 posts - 1 through 7 (of 7 total)

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