oracle数据导入dmp

导入数据库
--创建表空间(原数据库所在的表空间名)
create tablespace 表空间名 datafile 'g:\hygy\zjgltest.dbf' size 1024M;
--创建用户
create user xhdc identified by hygy default tablespace 表空间名;
--授予dba权限
grant dba to xhdc;
--创建目录
create or replace directory hygy_dir as 'G:\hygy';
--授予读写权限
grant read,write on directory hygy_dir to hygy;

这里先把dmp文件放到G:\hygy目录下后再在cmd窗口执行下列语句,直接执行。

--cmd导入
impdp hygy/hygy@orcl remap_schema=thytest7:hygy directory=hygy_dir dumpfile=T220190924hdp_1819_thytest7.dmp

imp fy1212/fy1212@127.0.0.1:1521/orcl file=D:\DMPS\fy1212\fyzj201912121629.dmp   fromuser=fyzj touser=fy1212

依次说明: hygy/hygy 为 用户名/密码 , thytest7为原导出用户名,hygy为新的导入用户名 ,   T220190924hdp_1819_thytest7.dmp为数据dmp名

posted @ 2019-09-30 16:32  凉了记忆  阅读(256)  评论(0编辑  收藏  举报