如何实现oracle向DB2数据库的大数据量迁移!

tomalun 2007-12-12 09:31:14
要实现从oracle数据库向DB2数据库的大数据量数据迁移,数据量2~5亿条,谁知道用什么方法能在10小时内实现数据的全部迁移,或者迁移速度能达到1万/秒也可以!
...全文
327 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
sqysll 2008-10-12
  • 打赏
  • 举报
回复
嗯,比较专业,尤其是1、2量条建议,很中肯
亮剑_ 2008-02-22
  • 打赏
  • 举报
回复
学习
tomalun 2007-12-14
  • 打赏
  • 举报
回复
已获得专家建议:
1. Tune your DB2 Server
Powerfull hardware is the simplest way to level up the performance. And try to tune your DB2 server configuration. A fine tuned DB2 server can achieve high throughput.

2. Using DB2 utility LOAD. (Best recommended)
The LOAD utility writes formatted pages directly into the database. You can turn off index statistic and constraint check, can utilize internal parallelism. etc..
So using LOAD will much faster than using SQL insert. About how to use LOAD, you can check DB2 Command Reference.

3. Using Static SQL application
Use SQLJ or other programming language to write a Store Procedure. Bind the plan and package. Just pass the variable to SP.

4. Using JDBC.
A question, is your Java app using one thread per connection to insert into DB2 table or all those threads share the same JDBC connection?
If one thread per connection. You'll encounter the Lock escalation on table if you don't issue the connection.commit() after executeBatch(). Other threads will be lock-wait.
Try to issue the SQL command " SET CURRENT DEGREE = ’ANY’ " and " SET CURRENT ISOLATION= UR " in the JDBC connection before you insert data.

5,891

社区成员

发帖
与我相关
我的任务
社区描述
IBM DB2 是美国IBM公司开发的一套关系型数据库管理系统,它主要的运行环境为UNIX(包括IBM自家的AIX)、Linux、IBM i(旧称OS/400)、z/OS,以及Windows服务器版本
社区管理员
  • DB2
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧