#! /bin/ksh
/app/mylinux/sqllib/bin/db2 connect to mydb
/app/mylinux/sqllib/bin/db2 export to exp_$1 of del messages msg select \* from $1
/app/mylinux/sqllib/bin/db2 connect reset
最近在linux下才刚刚遇到导出表的脚本,编辑上面脚本代码为myexport文件,加上可执行权限放在bin目录下。如后在要导出表的脚本命名test:
myexport mytest1;
myexport mytest2;
myexport mytest3;
...
然后执行sh ./test
阅读(1159) | 评论(0) | 转发(0) |