oracle exp、imp實現匯出匯入

來源:互聯網
上載者:User

一.說明
   oracle 的exp/imp命令用於實現對資料庫的匯出/匯入操作;


資料匯出:

exp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp--將資料庫完全匯出exp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp full = y--只匯出使用者myuser下的表exp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp owner = (myuser)--只匯出test1、test2表exp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp tables=(test1,test2)

資料匯入:

--全部匯入imp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp full = y--全部匯入,忽略已存在資料imp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp full = y ignore=y--只匯入test1 test2表imp myname/mypassword@192.168.100.152/orcl file = d:\my.dmp tables=(test1,test2)

exp匯出的時候  owner和tables只能指定其一
否則報錯
EXP-00026: 指定了衝突模式EXP-00000: 匯出終止失敗

imp匯入的時候 full和tables只能指定其一
否則報錯

IMP-00024: 只能指定一種模式 (TABLES, FROMUSER 或 FULL)IMP-00000: 未成功終止匯入

PS:只對命令作簡單說明,參數眾多,能實現基本訴求即可,如需詳細瞭解,查閱相關資料。



相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.