两种方式:按用户,按表结构。
方式一:按用户
导入当前数据库信息
1、导出数据---生产环境
exp imaging/imaging@10.124.84.25/img owner=imaging file=d:/imaging.dmp
exp sunimage/sunimage@10.124.84.25/img owner=sunimage file=d:/sunimage.dmp
exp sunflow/sunflow@10.124.84.25/img owner=sunflow file=d:/sunflow.dmp
2、删除用户---UAT环境
drop user imaging CASCADE;
drop user sunimage CASCADE;
drop user sunflow CASCADE;
3、创建用户---UAT环境
create user imaging identified by edmuat;
grant dba to imaging with admin option;
create user sunimage identified by edmuat;
grant dba to sunimage with admin option;
create user sunflow identified by sunflow;
grant dba to sunflow with admin option;
4、导入数据---UAT环境
imp imaging/imaging@10.124.84.91/img fromuser=imaging file=d:/imaging.dmp
imp sunimage/sunimage@10.124.84.91/img fromuser=sunimage file=d:/sunimage.dmp
imp sunflow/sunflow@10.124.84.91/img fromuser=sunflow file=d:/sunflow.dmp
补充:创建表空间
CREATE TABLESPACE imaging LOGGING DATAFILE 'C:\oracle\product\10.2.0\oradata\orcl\imaging_DATA01.DBF'
SIZE 500M AUTOEXTEND ON NEXT 32M MAXSIZE 5000M EXTENT MANAGEMENT LOCAL;
CREATE USER sunflow IDENTIFIED BY sunflow DEFAULT TABLESPACE imaging;
Oracle 数据迁移指南
本文介绍了一种使用 Oracle 的 expdp 和 impdp 工具按用户进行数据迁移的方法,包括从生产环境导出数据、在 UAT 环境中删除并重新创建用户,以及将数据导入到新的用户环境中。此外,还提供了创建表空间的具体步骤。
679

被折叠的 条评论
为什么被折叠?



