一、ORACLE导出dmp文件
在cmd中输入下面的命令就可以把oracle中某张表或者多张表导成dmp文件
只导表结构 某用户
exp 用户名/密码@数据库名 file=c:\文件.dmp owner=(YWAIR) rows=n
全部导出 某用户
exp 用户名/密码@数据库名 file=c:\文件.dmp owner=(YWAIR) rows=y
导出单表
exp 用户名/密码@数据库名 file=c:\文件.dmp statistics=none tables=student
导出多表
exp 用户名/密码@数据库名 file=c:\文件.dmp statistics=none tables=(student ,score,course)
二、ORACLE导入dmp文件
imp 用户名/密码@数据库名 file=F:\gssjzx20160621.dmp full=y ignore=y
imp system/123456@orcl file=F:\gdytmaingsfrk.dmp fromuser=gdytmain touser=gdytmain
imp 用户名/密码@准备还原的数据库名称 file=x.dmp fromuser=导出用户 touser=导入用户
网友评论