os info :suse linux 11
db info :db2 v9.7.0.4
user:数据库管理员用户
--
create procedure prc_exp_inc_dat_1()
language sql
BEGIN
DECLARE v_str VARCHAR(2000) default '';
set v_str='export to /backup/2012-09-02/tst.t_tst1.del of del select * from tst.t_tst1 where sta_dte=date(''2012-09-02'') fetch first 2 rows only with ur';
call sysproc.admin_cmd(v_str);
END@
--call
call prc_exp_inc_dat_1()@
报错 :
SQL3001C An I/O error (reason = "sqlofopn -2029060079") occurred while
opening the output file.
直接导出:db2 "export to /backup/2012-09-02/tst.t_tst1.del of del select * from tst.t_tst1 where sta_dte=date('2012-09-02') fetch first 2 rows only with ur"
是不会报错的,敬请专家帮忙看看,谢谢哈。
收起