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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章