大家好,请教一个问题,我现在需要把开发库上的数据库导入到生产库上,但生产库上的用户,已经有别的项目在用,有什么比较好的办法做呢?
原本准备将数据库导成脚本,在生产库上执行一下,但里面有大字段,无法导出。大虾指点一下!谢谢。

解决方案 »

  1.   

    导出CLOB的几个SQL语句:1.导出含有大字段数据的M条记录exp user/passwd statistics=none compress=n consistent=y file=/oradata/info/backup/exp_article.dmp log=/oradata/info/backup/exp_article.log tables=fsm_right_article query=\"where rownum\<=10\"2. 导出指定记录记录exp user/passwd statistics=none compress=n consistent=y file=/oradata/info/backup/exp_article.dmp log=/oradata/info/backup/exp_article.log tables=fsm_right_article query=\"where recordid=n\"3。 先将表按主键字段排序,然后取第1行到第2400行的记录exp user/passwd statistics=none compress=n file=/oradata/info/backup/article/article_$i.dmp log=/oradata/info/backup/article/article_$i.log consistent=y tables=fsm_right_article query=\"where articleid in \(select articleid from \(select rownum as r_n\, article\.articleid from \(select articleid from fsm_right_article order by articleid desc\) article where rownum \<= 2400\) where r_n \> 0\)\"
      

  2.   

    exp和expdp都能导出大对象数据。 建议用expdp
      

  3.   

    用 exp/imp 的可迁移表空间功能。transportable tablespace。
      

  4.   

    数据库版本!?
    如果支持expdp与impdp的话,在impdp时,加上REMAP_SCHEMA