Source database Duplicate database
SYSTEM: windows server 2008 R2 SYSTEM: windows server
2008 R2
IP ADDRESS:192.168.2.188 IP ADDRESS:192.168.2.199
HOST NAME:beijing HOST NAME:suzhou
ORACLE SID: orcl ORACLE SID: orcl
TNSNAMES:bj TNSNAMES:sz
1.源数据库和目标数据库检测
set oracle_sid=orcl
col name heading '实例名' for a10 col version heading '数据库版本' for a15 col
platform_name heading '操作系统平台' for a30 col endian_format heading
'字节顺序' for a15
SELECT d.NAME, i.VERSION, d.PLATFORM_NAME, ENDIAN_FORMAT FROM
V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d, V$INSTANCE i WHERE tp.PLATFORM_NAME =
d.PLATFORM_NAME and d.DB_UNIQUE_NAME = i.INSTANCE_NAME;
2.源数据库新建测试表空间和用户
create tablespace ocp datafile 'F:\app\Administrator\oradata\orcl\ocp01.dbf'
size 100m autoextend on next 10m maxsize unlimited extent management local
autoallocate segment space management auto;
create user test identified by password default tablespace ocp temporary
tablespace temp;
grant dba to test;
conn test/password@orcl
create table t1 ( sid int not null primary key, sname varchar2(10) );
insert into t1 values(101,'wind'); insert into t1 values(102,'snow'); insert
into t1 values(103,'apple');
commit;
select table_name from dba_tables where tablespace_name='OCP';