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

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

猜你喜欢

转载自www.cnblogs.com/ketoli/p/11613295.html