Oracle導入/導出

1、整庫

導出
打開cmd命令行

EXP system/password full=y

或者指定導出文件名:

EXP system/password full=y file=data.dmp

在這裏插入圖片描述
在這裏插入圖片描述
導入

IMP system/password full=y

此命令如果不指定file參數,則默認用備份文件 EXPDAT.DMP進行導入
如果指定file參數,則按照file指定的備份文件進行恢復

IMP system/password full=y file=data.dmp

在這裏插入圖片描述

2、按用戶:

導出

exp system/password owner=usertest file=usertest.dmp

導入

exp system/password owner=usertest file=usertest.dmp fromuser=usertest

3、按表:

導出

--多個表用逗號分開,此處用戶爲表所有者用戶
exp usertest/usertest file=a.dmp tables=students,scores

導入

--導入單個表
imp usertest/usertest file=a.dmp tables=students
--也可導入多個表,用逗號分隔
imp usertest/usertest file=a.dmp tables=students,scores
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章