Connecting Tech Pros Worldwide Forums | Help | Site Map

Stored Procedure has no access on a remote file

Newbie
 
Join Date: Nov 2008
Posts: 2
#1: Nov 12 '08
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's Avatar
Moderator
 
Join Date: Aug 2007
Location: Munich
Posts: 289
#2: Nov 12 '08

re: Stored Procedure has no access on a remote file


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
Newbie
 
Join Date: Nov 2008
Posts: 2
#3: Nov 14 '08

re: Stored Procedure has no access on a remote file


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
docdiesel's Avatar
Moderator
 
Join Date: Aug 2007
Location: Munich
Posts: 289
#4: Nov 18 '08

re: Stored Procedure has no access on a remote file


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
Reply