信念树下
--梦想只是不能实现的,想要实现就要有计划。
posts - 5,comments - 0,trackbacks - 0
准备两个bat。名字叫xxx.bat,ooo.bat。
内容如下:
xxx.bat

 

db2 connect to dbname user dbusr using dbpwd
set tmpFileList
=tmpFileList.temp
CALL :delTmpFile

for /"tokens=*" %%a in (
 
'dir "*.sql" /a /b'do ( 
 echo 
%%a>>"%tmpFileList%"
 )

for /"tokens=*" %%a in ( 'more "%tmpFileList%"'do ( 
echo db2 
-tvf %%-%%a.log
db2 
-tvf %%-%%a.log
)
:delTmpFile
del 
"%tmpFileList%" /1>nul 2>nul
goto :EOF

::===========================================::
ooo.bat

db2cw call ooo.bat

用上面两个文件会自动为当前文件夹下的每个文件生成执行log。

posted on 2011-05-26 11:50 三角形 阅读(244) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: