sqlplus / as sysdba
create tablespace KTMC logging datafile 'D:\app\Administrator\product
\11.2.0\dbhome_1\oradata\KTMC.dbf' size 256m autoextend on next 256m extent management
local;
//上面是创建数据库本地存储的位置
create user ktcm_ao identified by kingthis default tablespace KTMC temporary tablespace
temp;
grant connect,resource,dba to ktcm_ao;
--grant read,write on directory DATA_PUMP_DIR to ktmc;
imp ktcm_ao/kingthis file=d:\ktamao20170920.dmp full=y;
//导入备份文件 账号密码都在
impdp ktmc/ktmc@orcl directory=DATA_PUMP_DIR dumpfile=ktcm_ao20160510.dmp
table_exists_action=replace full=y ;
//第二种导入方式
//下面是普通sql
select username,default_tablespace from dba_users;
drop tablespace ktmc including contents and datafiles;
drop user ktcm_ao cascade;
select username,sid,serial# from v$session;
alter system kill session '165,16';
drop user ktmc cascade;
create tablespace KTMC logging datafile 'D:\app\Administrator\product
\11.2.0\dbhome_1\oradata\KTMC.dbf' size 256m autoextend on next 256m extent management
local;
//上面是创建数据库本地存储的位置
create user ktcm_ao identified by kingthis default tablespace KTMC temporary tablespace
temp;
grant connect,resource,dba to ktcm_ao;
--grant read,write on directory DATA_PUMP_DIR to ktmc;
imp ktcm_ao/kingthis file=d:\ktamao20170920.dmp full=y;
//导入备份文件 账号密码都在
impdp ktmc/ktmc@orcl directory=DATA_PUMP_DIR dumpfile=ktcm_ao20160510.dmp
table_exists_action=replace full=y ;
//第二种导入方式
//下面是普通sql
select username,default_tablespace from dba_users;
drop tablespace ktmc including contents and datafiles;
drop user ktcm_ao cascade;
select username,sid,serial# from v$session;
alter system kill session '165,16';
drop user ktmc cascade;