一、導出表
1、導出自己的表
exp userid=scott/giger@orcl tables=(emp,.....) file=d:\e.dmp;
備:導出多張表之間用,逗號分別。linux 的路徑和windows 路徑區別。
2、導出其它方案的表
exp userid=sys/sys@orcl tables=(swserp.tbsuser) file='/tmp/e.dmp';
備:用戶要導出其它方案的表,則需要dba的權限,grant 授予exp_full_database權限。
二、導出表結構
1、導出表結構
exp userid=swserp/swserp@orcl tables=(tbsuser,....) file='/tmp/m.dmp' rows=n;
2、使用直接導出方式
exp userid=swserp/swserp@orcl tables=(tbsuser,....) file='/tmp/m.dmp' direct=y
備:這種方式,當數據量大的時候,可以使用這樣的方法。前提是,數據庫的字符集與客戶端的字符集要完全一致,否則會報錯。
三、導出方案
1、導出自己的方案
exp swserp/swserp@orcl owner=swserp file ='/tmp/swserp.dmp'
備註:多個方案可以通過,逗號分開。
2、導出其它方案
exp sys/sys@orcl owner=(swserp) file='/tmp/swserp.dmp'
備註:需要有DBA的權限。
四、導出數據庫
exp userid=system/system@orcl full=y inctype=complete file=x.dmp
備:必須有exp_full_database權限