Oracle匯入 匯出某個使用者下的資料庫

2021-08-27 20:55:36 字數 852 閱讀 6644

空表不會被匯出

基本語法和例項:

1、exp:

有三種主要的方式(完全、使用者、表)

1、完全:

exp system/manager buffer=64000 file=c:\full.dmp full=y

如果要執行完全匯出,必須具有特殊的許可權

2、使用者模式:

exp sonic/sonic buffer=64000 file=c:\sonic.dmp owner=sonic

這樣使用者sonic的所有物件被輸出到檔案中。

3、表模式:

exp sonic/sonic buffer=64000 file=c:\sonic.dmp owner=sonic tables=(sonic)

這樣使用者sonic的表sonic就被匯出

2、imp:

具有三種模式(完全、使用者、表)

1、完全:

imp system/manager buffer=64000 file=c:\full.dmp full=y

2、使用者模式:

imp sonic/sonic buffer=64000 file=c:\sonic.dmp fromuser=sonic touser=sonic

這樣使用者sonic的所有物件被匯入到檔案中。必須指定fromuser、touser引數,這樣才能匯入資料。

3、表模式:

exp sonic/sonic buffer=64000 file=c:\sonic.dmp owner=sonic tables=(sonic)

這樣使用者sonic的表sonic就被匯入。

參考博文:

oracle 刪除某個使用者下的所有物件

先存放好dropobj.sql 檔案 然後登入需要刪除的使用者 刪除前最好備份一下 備份是在cmd中進行的 c users panfu exp file d expall.dmp log expall.logfull y export release 10.2.0.1.0 production on...

oracle下匯出某使用者下的表

scott tiger是使用者名稱和密碼,handson是匯出的例項名 按使用者方式匯出資料 owner當中寫的是使用者名稱 exp scott tiger handson file scott back owner scott 按表方式匯出資料 talbes當中寫的是全部表的名稱 exp scot...

Oracle中刪除某個使用者下的所有表

一般的方法 先使用sql查詢 select delete from table name from user tables order by table name 將查詢結果複製一下,在sql命令視窗裡再執行一次就刪除了所有的表。select drop table table name from c...