用dmp文件导入本地库

select * from dba_users;

select * from dba_users;
--expdp GZIDC_GIKAMDATA/Gzidclims2021@127.0.0.1/orcl directory=dbback dumpfile=GZIDC_GIKAMDATA2022-7-19.dmp schemas=GZIDC_GIKAMDATA logfile=GZIDC_GIKAMDATA2022-7-19.log version=12.2.0.1.0
select tablespace_name,file_name from dba_data_files; 
sqlplus / as sysdba
drop user GZIDC cascade;
drop tablespace IDC_GIKAMDATA including contents and datafiles;

create tablespace IDC_GIKAMDATA logging datafile 'D:\APP\IDC_GIKAMDATA.DBF' size 500m autoextend on next 500m maxsize unlimited extent management local;
create user GZIDC Identified by gzidc Default tablespace IDC_GIKAMDATA Temporary tablespace temp Quota 20m on users;
grant create session,dba to GZIDC;
grant create any directory to GZIDC;
create or replace directory dbback as 'D:\app\gikam-dmp';
grant read,write on directory dbback to GZIDC;
select * from dba_directories


--impdp GZIDC/gzidc@127.0.0.1/orcl DIRECTORY=dbback DUMPFILE=GZIDC_GIKAMDATA20220929.DMP REMAP_SCHEMA=GZIDC_GIKAMDATA:GZIDC remap_tablespace=IDC_GIKAMDATA:IDC_GIKAMDATA transform=OID:N table_exists_action=replace logfile=import2022-2-16.log

--expdp GZIDC_GIKAMDATA/Gzidclims2021@127.0.0.1/orcl directory=dbback dumpfile=GZIDC_GIKAMDATA2022-7-19.dmp schemas=GZIDC_GIKAMDATA logfile=GZIDC_GIKAMDATA2022-7-19.log version=12.2.0.1.0

 

posted @ 2022-10-31 14:26  Recouar  阅读(42)  评论(0编辑  收藏  举报