//创建表空间
CREATE TABLESPACE platform
LOGGING
DATAFILE
'F:\oracle\product\10.2.0\oradata\orcl\platform.dbf' SIZE 1000M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
//赋予权限
create user xxxx1 identified by xxxx2 default tablespace platform;
grant connect,resource to xxxx1 ;
grant exp_full_database to xxxx1 ;
grant imp_full_database to xxxx1;
//导出数据库
exp xxxx1 /xxxx2@xxxx3(要导的库) file=8301747.dmp
imp xxxx1/xxxx2 full=y file=8301747.dmp
exp userid=scott/123@orcl tables=(emp,dept) file=d:\1.dmp;
导出别的用户的表
exp userid=system/manager@orcl tables=(scott.emp,scott.dept)file=d:\2.dmp;
只导出表结构 + rows=n;
exp userid=system/manager@orcl tables=(scott.emp,scott.dept)file=d:\2.dmp rows=n;
直接导出数据库 +direct=y;
本地字符集和导库字符集一致 否则报错 速度快
exp userid=system/manager@orcl tables=(scott.emp,scott.dept)file=d:\3.dmp direct=y;