“辣条嘎嘣脆”通过精心收集,向本站投稿了2篇一个成批删除临时表的sh用于informix,以下文章小编为您整理后的一个成批删除临时表的sh用于informix,供大家阅读。
篇1:一个成批删除临时表的sh用于informix
#!/bin/csh
if($#argv!=1 then
echo“Usage:cshdeltmp.sh[dbname]”;
exit(0);
elseif($#argv==1 then
setdbname=“$argv[1]”;
endif
rmdeltmp*.sql
echo“nowloadtmptabletodeltmp.sql”
dbaccess$dbname<
unloadto“deltmp.sql”
selecttabnamefromsystableswheretabnamelike“tmp%”andcreated
EOF
echo“loadfinish”
echo“|-->;”
sed's/|/;/wdeltmp1.sql'deltmp.sql
echo“tmp-->droptabletmp”
sed's/tmp/droptabletmp/wdeltmp2.sql'deltmp1.sql
echo“deletetemptable”
dbaccess$dbnamedeltmp2.sql
echo“deleletempfiles”
rmdeltmp*.sql
篇2:一个批量删除临时表的sh用于informix数据库
#!/bin/csh if($#argv!=1then echo“Usage:cshdeltmp.sh[dbname]”; exit(0); elseif($#argv==1then setdbname=“$argv[1]”; endif rmdeltmp*. sql echo“nowloadtmptabletodeltmp.sql” dbaccess$dbnameEOF unloadto“deltmp.sql” selecttabnamefromsystableswhere
#!/bin/cshif ($#argv != 1 then
echo “Usage:csh deltmp.sh [dbname]”;
exit(0);
else if ($#argv == 1 then
set dbname=“$argv[1]”;
endif
rm deltmp*.sql
echo “now load tmp table to deltmp.sql”
dbaclearcase/“ target=”_blank“ >ccess $dbname <
unload to ”deltmp.sql“
select tabname from systables where tabname like ”tmp%“ and created < extend(current,year to day)
EOF
echo ”load finish“
echo ”| --> ;“
sed 's/|/;/w deltmp1.sql' deltmp.sql
echo ”tmp --> drop table tmp“
sed 's/tmp/drop table tmp/w deltmp2.sql' deltmp1.sql
echo ”delete temp table“
dbaccess $dbname deltmp2.sql
echo ”delele temp files"
rm deltmp*.sql
原文转自:www.ltesting.net
★ 临时劳动合同
★ 临时合同范本
★ 临时劳动协议书
★ 临时用工劳动合同
★ 临时党支部请示
★ 临时救助申请书
★ 临时清洁工合同
★ 临时工作安排
一个成批删除临时表的sh用于informix(通用2篇)




