Chapter18-Export and Import Utilities
1、export和import操作的.dmp文件,是一種二進(jìn)制文件;面對一些小型的數(shù)據(jù)庫,可以應(yīng)付;但是對于那些大型的數(shù)據(jù)庫,就有些吃力了;Import和export將逐漸的被淘汰;
- exp.exe->exedp.exe
- imp.exe->impdp.exe
- *.dmp文件時平臺無關(guān)性的;
2、Before Your Use Of Exp/Imp
- Run the catexp.sql or catalog.sql script(如果DBA是用DBCA工具創(chuàng)建的數(shù)據(jù)庫,Oracle ?server 會自動執(zhí)行上述兩個腳本;如果是手工創(chuàng)建的數(shù)據(jù)庫,則需要手工執(zhí)行上述兩個腳本)
3、Methods to invoke Exp/Imp
- Command-line interface
- An interactive mode
- Parameter files
- Oracle Enterprise Manager
4、exp命令使用
- exp a1/a1@DB200 file=a1.dmp owner=a1 log=a1.log
5、Export Modes
| Table Mode | User Mode | Tablespace Mode | Full Database Mode |
| Table definitions Table data(all or selected rows) Owner`s table grants Owner`s table indexes Table constraints | Tables definitions Tables data Owner`s grants Owner`s indexes Tables constraints | Table definitions Grants Indexes Table constraints Triggers ? | Table definitions Tables data Grants Indexes Tables contraints |
?
?
?
?
?
?
?
- Full Database Mode基本上被RMAN或者一些第三方工具給代替;
- Tablespace Mode擁有特有的用途;
- Table Mode或者User Mode比較常見;
6、Invoking Export
Syntax:exp keyword=value,value2,...,valuen
Example:
- exp hr/hr TABLES=employees,departments rows=y file=exp1.dmp
- tables=employees,departments表示只導(dǎo)出這兩張表
- rows=y,表示只導(dǎo)出數(shù)據(jù)
- exp system/manager owner=hr direct=y file=expdata.dmp
- owner=hr,表示導(dǎo)出hr這個用戶的所有數(shù)據(jù)信息
- exp \'username/password as sysdba'\ transport_tablespace=y tablespaces=ts_emp log=ts_emp.log
- \'username/password as sysdba'\表示以sysdba身份導(dǎo)出數(shù)據(jù)
- transport_tablespace=y表示只導(dǎo)出表空間的相關(guān)的數(shù)據(jù)字典信息(這個數(shù)據(jù)量很少),而表空間上的數(shù)據(jù)不會導(dǎo)出;
- tablespaces=ts_emp,表示要導(dǎo)出的表空間名稱
7、How the Transportable TS Modes Works
?
?
簡述:通過Transportable模式進(jìn)行exp操作,實際上導(dǎo)出的.dmp文件僅僅是被導(dǎo)出tablespace的相關(guān)的數(shù)據(jù)字典信息(也就是此tablespace在system dictionary中的登記信息),而實際tablespace中的數(shù)據(jù)信息,則是通過中介os copy的模式進(jìn)行的;如此以來可以大大提高效率;
8、導(dǎo)出數(shù)據(jù)的兩種方式
- Direct Paht
- Convention Paht
9、grant imp_full_database to u2
給用戶u2授權(quán)imp_full_database命令,使其能夠?qū)肫渌脩舻膁mp文件.
轉(zhuǎn)載于:https://www.cnblogs.com/arcer/archive/2013/03/21/2973055.html
總結(jié)
以上是生活随笔為你收集整理的Chapter18-Export and Import Utilities的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HDU 3033 I love snea
- 下一篇: 服务器中毒 HTML.IFrame.la