开发者

Is there a limit to DB2 JDBC transaction size?

I need to insert a large number of rows (up to 100,000) into 6 different DB2 tables. I am using Java JDBC to do it. I would like to do it all in a single database transaction so that the whole thing can be rolled back if any issues are encountered. Is there a limit somewhere (in JDBC driver or in DB2) to how many inserts can be handled in a single transa开发者_JAVA技巧ction? We are using DB2 version 8.


The size of a single transaction is limited by the size of the database transaction logs. With a sufficiently large transaction log you can do what you are asking.

You don't say what platform you are running DB2 on, but for Linux/UNIX/Windows the transaction log size is controlled by three database configuration parameters - LOGFILSIZ (the size of each transaction log file), LOGPRIMARY (the number of primary transaction logs) and LOGSECOND (the number of secondary transaction log files).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜