sqlldr基础.docVIP

  • 6
  • 0
  • 约 12页
  • 2016-12-07 发布于河南
  • 举报
sqlldr基础

sqlldr基础 在 Oracle 数据库中,我们通常在不同数据库的表间记录进行复制或迁移时会用以下几种方法: 1. A 表的记录导出为一条条分号隔开的 insert 语句,然后执行插入到 B 表中 2. 建立数据库间的 dblink,然后用 create table B as select * from A@dblink where ...,或 insert into B select * from A@dblink where ... 3. exp A 表,再 imp 到 B 表,exp 时可加查询条件 4. 程序实现 select from A ..,然后 insert into B ...,也要分批提交 5. 再就是本篇要说到的 Sql Loader(sqlldr) 来导入数据,效果比起逐条 insert 来很明显 第 1 种方法在记录多时是个噩梦,需三五百条的分批提交,否则客户端会死掉,而且导入过程很慢。如果要不产生 REDO 来提高 insert into 的性能,就要下面那样做: 1. alter table B nologging; 2. insert /* +APPEND */ into B(c1,c2) values(x,xx); 3. insert /* +APPEND */ into B select * from A@dblin

文档评论(0)

1亿VIP精品文档

相关文档