oracle 数据库迁移

时间:2021-07-16 14:19:10

 

 把数据从开发数据库迁移到测试数据库 以便单元测试通过

 

bat脚本:

---------------------------------------------------------------

 

exp iplat/iplat@IPLATINSTALL OWNER=iplat file=E:/oracleData/iplat.DMP log=E:/oracleData/iplat.log

 

sqlplus   sys/iplat@ORCL  as sysdba @E:/oracleData/deleteTableUser.sql  

 

imp iplat/iplat@ORCL fromuser=iplat touser=iplat file=E:/oracleData/iplat.DMP log=E:/oracleData/iplattest.log

 

---------------------------------------------------------------

 

E:/oracleData/deleteTableUser.sql  导入之前删除该用户数据:

-----------------------------------------------------------------

drop user iplat cascade;


CREATE USER iplat IDENTIFIED BY iplat DEFAULT TABLESPACE DS_IPLAT01;
GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO iplat identified by iplat;

quit;

------------------------------------------------------------------