Repeat a SQL Multiple Times with db2batch

Just enclose the SQL statements within --#BGBLK and --#EOBLK and feed it with a repeat-count as shown in input.sql.

Then run

db2batch -d DATABASE_NAME -f input.sql  

Reference:

  1. IBM Knowledge Center: http://www-01.ibm.com/support/knowledgecenter/SSEPGG9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0002043.html?cp=SSEPGG9.7.0%2F3-6-2-6-14

  2. DB Fourms: http://www.dbforums.com/db2/1690408-db2batch-repeat-mode-printthread.html

comments powered by Disqus