4

I am using Sybase IQ 15 version database.

trying to load IQ table from delimited flat file

Load Table test (a,b)
using client file '/xyz/test.dat'
ESCAPES OFF
FORMAT BCP
DELIMITED BY '|';

is it failing with below error

Msg 21, Level 14, State 0:SQL Anywhere Error -1006140: I/O Error on file/xyz/test.dat - (hos_clientfileio.cxx 142)

set below option on IQ server level ,still getting same error

set option allow_read_client_file='on' ;
grant READCLIENTFILE to finsrv ;

data file is on unix client machine and File content as below

1|01

2|02

Can someone please help/advice?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Nishad
  • 426
  • 2
  • 7
  • 20
  • NOTE: I'm assuming `/xyz/` is an attempt to mask your actual directory structure.] Have you verified that you've provided the correct (full) path to the file? At the OS level command prompt, does `ls /xyz/test.dat` show your file or generate an error? – markp-fuso Jan 04 '18 at 16:05
  • Yes, /xyx/ is masked value and ls command lists correct file without error – Nishad Jan 05 '18 at 04:41

1 Answers1

0

Its likely a userright permission settings issue.

Try to change all the directories of /xyz/test.dat to 755 (drwxr-xr-x):

shell command at client machine:

1 - sudo chmod 755 -R /xyz/

or

2 - find /xyz/ -type d -exec chmod 755 {} \;

See also here on SO for more detail on user-rights and here for official Ubuntu explanation.

ZF007
  • 3,708
  • 8
  • 29
  • 48