DB2+SQL2036N
在使用db2的时候发现一个奇怪的问题,用import可以导入数据,但是用load就导入失败,报SQL2036N SQL2036N The path for the file, named pipe, or device “/home/test/test.sh”
is not valid.
前言
在使用db2的时候发现一个奇怪的问题,用import可以导入数据,但是用load就导入失败,报SQL2036N真实案例
1.执行load导入语句
代码如下(示例):
执行load
db2 "load from 'test.sh' of del insert into test"
2.错误信息
代码如下(示例):
SQL3501W The table space(s) in which the table resides will not be placed in
backup pending state since forward recovery is disabled for the database.
SQL3109N The utility is beginning to load data from file
"/home/test/test.sh".
SQL2036N The path for the file, named pipe, or device "/home/gbicc/test.sh"
is not valid.
SQL3107W At least one warning message was encountered during LOAD processing.
Number of rows read = 0
Number of rows skipped = 0
Number of rows loaded = 0
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 0
3.解决办法
代码如下(示例):
将该目录授予755权限
chmod 755 /home/test
将文件授予755权限
chmod 755 test.del
然后在执行load语句
db2 "load from 'test.sh' of del insert into test"