Stored Procedure has no access on a remote file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tom62
    New Member
    • Nov 2008
    • 2

    Stored Procedure has no access on a remote file

    Hello

    I have a stored procedure reading a file. It works properly as long as the file is local. If I try to read a file from a mapped drive from a different machine I get a file reading error.
    Is there a limitation to read only local files, or is anywhere a security switch to solve this problem?

    Regards

    Tom62
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

    I guess you checked the file access permissions on the remote file? What OS and filesystems are you using on your DB2 server and the remote file server? Is the remote file system mounted via NFS or Samba/CIFS?

    If it's NFS and you mounted it by TCP, then try using UDP and let us know if this helped. (I once experienced that DB2 doesn't like LOAD from TCP NFS filesystems.)

    Best regards

    Doc Diesel

    Comment

    • tom62
      New Member
      • Nov 2008
      • 2

      #3
      Hello

      Yes, I have the rights on the mapped drive... It's no so easy, unfortunately.

      - I use DB2 Version 7.2 on Windows XP as test server
      - The file to read is on a other XP machine (NTFS)
      - I tried to read on a mapped drive

      What do you mean with NTFS mounting on TCP? I'm no crack in networking...

      Tom

      Comment

      • docdiesel
        Recognized Expert Contributor
        • Aug 2007
        • 297

        #4
        Hi,

        if you're working with Windows on both sides, then the protocol used is SMB/CIFS, means NFS has nothing to do with this.

        One point may be that the DB2 process is using different users than yours (e.g. db2inst1 for the instance and db2fenc1 for stored procedures). Make sure they have access to the remote files, too, not only your user.

        The other thing is that the mapped drive letter may not be visible or accessible in the DB2 address space. Try to use UNC path instead, like \\WINSRV\SHARE . (At least, as soon as you log off the drive letter will vanish.)

        Maybe you need to add both machines to a domain or active directory and then use domain users for the DB2 processes.

        Regards



        Doc Diesel

        Comment

        Working...