Home Forums Programming General stored procedure unable to find file on another server RE: stored procedure unable to find file on another server

  • What OS user is running your SQL Server instance?

    What SQL user is running your stored procedure?

    How are you accessing the file, when it is on the same server?

    What file-transfer protocols are required to access the file on the remote server (SMB, FTP, SFTP)?

    Is the other server on the same domain (or a domain with an adequate trust relationship)?

    Assuming SMB is your transfer protocol, essentially, the other server has to accept fileshare connections from the user that is running the SQL Server processes.

    If the two servers are on the same domain and the SQL Server instance is running under an account which supplies a network credential (i.e. NETWORK SERVICE or a domain account; note that machine-local accounts and SYSTEM do not), then you may be able to permit that account to access the remote file share.

    You will also have to specify UNC paths, rather than a mapped drive letter, as the drive letter is transient, while the UNC path should be fixed.