--导入测试数据库
--connect sys/password as sysdba
---删除表空间
drop tablespace pt6 INCLUDING CONTENTS;
drop tablespace mpm INCLUDING CONTENTS;
drop tablespace oms INCLUDING CONTENTS;
--当首次导入时创建表空间 (运行脚本时会提示输入 &1 输入数据文件希望存放的物理地址 例如 D:\OracleData)
create tablespace pt6 datafile 'F:\Oracle_Data\omsADJ\pt6.dbf' size 100m autoextend on next 10m;
create tablespace mpm datafile 'F:\Oracle_Data\omsADJ\mpm.dbf' size 100m autoextend on next 10m;
create tablespace oms datafile 'F:\Oracle_Data\omsADJ\oms.dbf' size 100m autoextend on next 10m;
--删除用户
drop user pt6 CASCADE;
drop user mpm CASCADE;
drop user oms CASCADE;
--创建用户
create user pt6 identified by cape default tablespace pt6;
create user mpm identified by cape default tablespace mpm;
create user oms identified by cape default tablespace oms;
--赋权限
grant dba to pt6;
grant dba to mpm;
grant dba to oms;
grant all on dual to pt6 with grant option;
grant all on dual to oms with grant option;
grant all on dual to mpm with grant option;
expdp pt6/cape@mPMoms dumpfile=MPMoms20131122.EXPDB logfile=MPMoms20131122.log schemas=(pt6,mpm,oms)
impdp pt6/cape@192.168.0.20:1521/MPMoms dumpfile=MPMoms20131029_DKBK.EXPDB schemas=(pt6,mpm,oms)
--connect sys/password as sysdba
---删除表空间
drop tablespace pt6 INCLUDING CONTENTS;
drop tablespace mpm INCLUDING CONTENTS;
drop tablespace oms INCLUDING CONTENTS;
--当首次导入时创建表空间 (运行脚本时会提示输入 &1 输入数据文件希望存放的物理地址 例如 D:\OracleData)
create tablespace pt6 datafile 'F:\Oracle_Data\omsADJ\pt6.dbf' size 100m autoextend on next 10m;
create tablespace mpm datafile 'F:\Oracle_Data\omsADJ\mpm.dbf' size 100m autoextend on next 10m;
create tablespace oms datafile 'F:\Oracle_Data\omsADJ\oms.dbf' size 100m autoextend on next 10m;
--删除用户
drop user pt6 CASCADE;
drop user mpm CASCADE;
drop user oms CASCADE;
--创建用户
create user pt6 identified by cape default tablespace pt6;
create user mpm identified by cape default tablespace mpm;
create user oms identified by cape default tablespace oms;
--赋权限
grant dba to pt6;
grant dba to mpm;
grant dba to oms;
grant all on dual to pt6 with grant option;
grant all on dual to oms with grant option;
grant all on dual to mpm with grant option;
expdp pt6/cape@mPMoms dumpfile=MPMoms20131122.EXPDB logfile=MPMoms20131122.log schemas=(pt6,mpm,oms)
impdp pt6/cape@192.168.0.20:1521/MPMoms dumpfile=MPMoms20131029_DKBK.EXPDB schemas=(pt6,mpm,oms)