手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

SQL*Plus copy 命令处理大批量数据复制

[日期:2013-05-02] 来源:CSDN  作者:robinson [字体:大 中 小]

3、同一数据库不同schema之间数据复制

--下面使用了append方式,同时指定from及to子句
scott@SYBO2SZ> copy from scott/tiger@sybo2sz to goex_admin/xxx@sybo2sz -
> append tb_emp using select * from emp;

Array fetch/bind size is 2000. (arraysize is 2000)
Will commit when done. (copycommit is 0)
Maximum long size is 5000. (long is 5000)
Table TB_EMP created.

  14 rows selected from scott@sybo2sz.
  14 rows inserted into TB_EMP.
  14 rows committed into TB_EMP at goex_admin@sybo2sz.

4、不同数据库之间的数据复制

--不同数据库之间的复制一定要指定目的数据库连接字符串     
scott@SYBO2SZ> copy from scott/tiger@sybo2sz to goex_admin/xxx@cnmmbo -
> append tb_emp using select * from emp;

Array fetch/bind size is 2000. (arraysize is 2000)
Will commit when done. (copycommit is 0)
Maximum long size is 5000. (long is 5000)
Table TB_EMP created.

  14 rows selected from scott@sybo2sz.
  14 rows inserted into TB_EMP.
  14 rows committed into TB_EMP at goex_admin@cnmmbo.

5、不同Oracle版本之间的数据复制

--下面是oracle 10g到oracle 11g之间的数据复制
cott@SYBO2SZ> copy from scott/tiger@sybo2sz to scott/tiger@ora11g -
> create tb_emp using select * from emp where deptno=30;

Array fetch/bind size is 2000. (arraysize is 2000)
Will commit after every 0 array binds. (copycommit is 0)
Maximum long size is 5000. (long is 5000)
Table TB_EMP created.

  6 rows selected from scott@sybo2sz.
  6 rows inserted into TB_EMP.
  6 rows committed into TB_EMP at scott@ora11g.

--也可以从oracle 11g复制数据到oracle 10g,此处省略
--跨平台复制数据,没有环境,有待测试

linux
相关资讯       SQL*PLUS 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款