欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

XTTS数据迁移Windows--Linux

时间:2023-07-15
1、确认迁移的对象

迁移用户:T1、T2、T3、TEST
xtts迁移表空间:USERS、BIG1、T2、T3

2、判断表空间是否自包含

execute sys.dbms_tts.transport_set_check(‘USERS,BIG1,T2,T3’,true);
col violations for a100
select * from sys.transport_set_violations;

3、开启块追踪

alter database enable block change tracking using file ‘F:xtts_copyxtts.trc’;

4、源端进行数据文件copy

rman target /
backup as copy datafile 9,10 format ‘F:xtts_copyT2_%U.dbf’;
backup as copy datafile 11,12 format ‘F:xtts_copyT3_%U.dbf’;
backup as copy datafile 13 format ‘F:xtts_copyBIG1_%U.dbf’;
backup as copy datafile 4 format ‘F:xtts_copyUSERS_%U.dbf’;

5、目标端数据文件字节序转换

convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/BIG1_DATA_D-CSDB_I-3295990825_TS-BIG1_FNO-13_07VVDIOL.DBF’ format ‘+DATA/orcl/datafile/big01.dbf’;
convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/T2_DATA_D-CSDB_I-3295990825_TS-T2_FNO-10_04VVDIJJ.DBF’ format ‘+DATA/orcl/datafile/t202.dbf’;
convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/T2_DATA_D-CSDB_I-3295990825_TS-T2_FNO-9_03VVDIJ4.DBF’ format ‘+DATA/orcl/datafile/t201.dbf’;
convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/T3_DATA_D-CSDB_I-3295990825_TS-T3_FNO-11_05VVDILD.DBF’ format ‘+DATA/orcl/datafile/t301.dbf’;
convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/T3_DATA_D-CSDB_I-3295990825_TS-T3_FNO-12_06VVDILS.DBF’ format ‘+DATA/orcl/datafile/t302.dbf’;
convert from platform ‘Microsoft Windows x86 64-bit’ datafile ‘/tmp/xtts/USERS_DATA_D-CSDB_I-3295990825_TS-USERS_FNO-4_08VVDITL.DBF’ format ‘+DATA/orcl/datafile/users02.dbf’;

6、查询SCN,做为增量备份的起点

alter system checkpoint;
select current_scn from v$database;
current_scn
——————
1048072

7、进行增量备份

select current_scn from v$database;
current_scn
——————
1048508

run{
set until scn=1048508;
backup incremental from scn 1048072 datafile 5,6,9,10,11,12,13,4 format ‘F:xtts_copyxtts_incr1_%U.bak’;
}

8、目标端对增量备份进行转换与应用

vi xtts_conv1.sql
declare
handle varchar2(512);
media varchar2(80);
comment varchar2(80);
concur boolean;
recid number;
stamp number;
pltfrmfr number;
devtype varchar2(512);
begin
begin
sys.dbms_backup_restore.restoreCancel(true);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.backupBackupPiece(bpname => ‘/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK’,
fname => ‘/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,handle => handle,media=> media,
comment=> comment, concur=> concur,recid=> recid,stamp => stamp, check_logical => FALSE,copyno=> 1,
deffmt=> 0, copy_recid=> 0,copy_stamp => 0,npieces=> 1,dest=> 0,pltfrmfr=> 13);
end;
end;
/

start xtts_conv1.sql;

vi apply_incr1.sql
set serveroutput on;
declare
outhandle varchar2(512);
outtag varchar2(512);
done boolean;
failover boolean;
devtype varchar2(512);
begin
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 13,toname => ‘+DATA/orcl/datafile/big01.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 13’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 4,toname => ‘+DATA/orcl/datafile/users02.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 4’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 9,toname => ‘+DATA/orcl/datafile/t201.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 9’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 10,toname => ‘+DATA/orcl/datafile/t202.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 10’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 11,toname => ‘+DATA/orcl/datafile/t301.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 11’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 12,toname => ‘+DATA/orcl/datafile/t302.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 12’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR1_09VVDPF9_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
end;
/

@apply_incr1.sql;

9、正式割接准备

lsnrctl stop
purge dba_recyclebin;
show parameter job_queue_processes;
NAME TYPE VALUE


job_queue_processes integer 1000

alter system set job_queue_processes=0;
select local_tran_id,state from dba_2pc_pending;

SQL> alter tablespace users read only;

表空间已更改。

SQL> alter tablespace big1 read only;

表空间已更改。

SQL> alter tablespace t2 read only;

表空间已更改。

SQL> alter tablespace t3 read only;

表空间已更改。

10、表空间read only后,做最后一次增量备份

run{
set until scn=1199060;
backup incremental from scn 1048508 datafile 5,6,9,10,11,12,13,4 format ‘F:xtts_copyxtts_incr2_%U.bak’;
}

—目标端转换、应用
declare
handle varchar2(512);
media varchar2(80);
comment varchar2(80);
concur boolean;
recid number;
stamp number;
pltfrmfr number;
devtype varchar2(512);
begin
begin
sys.dbms_backup_restore.restoreCancel(true);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.backupBackupPiece(bpname => ‘/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK’,
fname => ‘/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,handle => handle,media=> media,
comment=> comment, concur=> concur,recid=> recid,stamp => stamp, check_logical => FALSE,copyno=> 1,
deffmt=> 0, copy_recid=> 0,copy_stamp => 0,npieces=> 1,dest=> 0,pltfrmfr=> 13);
end;
end;
/

set serveroutput on;
declare
outhandle varchar2(512);
outtag varchar2(512);
done boolean;
failover boolean;
devtype varchar2(512);
begin
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 13,toname => ‘+DATA/orcl/datafile/big01.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 13’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 4,toname => ‘+DATA/orcl/datafile/users02.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 4’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 9,toname => ‘+DATA/orcl/datafile/t201.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 9’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 10,toname => ‘+DATA/orcl/datafile/t202.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 10’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 11,toname => ‘+DATA/orcl/datafile/t301.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 11’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
begin
dbms_output.put_line(‘begin apply incr1’);
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => false, cleanup => false);
sys.dbms_backup_restore.applyDatafileTo(
dfnumber => 12,toname => ‘+DATA/orcl/datafile/t302.dbf’,
fuzziness_hint => 0,max_corrupt => 0, islevel0 => 0, recid =>0,stamp =>0);
dbms_output.put_line(‘done: applyDatafileTo 12’);
sys.dbms_backup_restore.restoreSetPiece(
handle=>’/tmp/xtts/incr/XTTS_INCR2_0LVVL4NF_1_1.BAK_CONV’,
tag=>null,fromdisk=>true,recid=>0,stamp=>0);
sys.dbms_backup_restore.restoreBackupPiece(done => done, params => null, outhandle => outhandle,outtag => outtag, failover => failover);
dbms_output.put_line(‘done: restoreBackupPiece’);
sys.dbms_backup_restore.restoreCancel(true);
sys.dbms_backup_restore.deviceDeallocate;
end;
end;
/

begin apply incr1
done: applyDatafileTo 13
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 4
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 5
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 6
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 9
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 10
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 11
done: restoreBackupPiece
begin apply incr1
done: applyDatafileTo 12
done: restoreBackupPiece

PL/SQL procedure successfully completed.

11、源端导出表空间的元数据

exec dbms_tts.transport_set_check(‘USERS,BIG1,T2,T3’,TRUE);
select * from sys.transport_set_violations;
未选定行

expdp sys/1 directory=dir dumpfile=xtts.dmp TRANSPORT_TABLESPACES=USERS,BIG1,T2,T3 transport_full_check=y exclude=STATISTICS logfile=xtts.log
Export: Release 11.2.0.1.0 - Production on 星期一 5月 24 13:06:36 2021

Copyright © 1982, 2009, Oracle and/or its affiliates、All rights reserved.

UDE-01017: 操作产生了 ORACLE 错误 1017
ORA-01017: 用户名/口令无效; 登录被拒绝

用户名: / as sysdba

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 “SYS”.“SYS_EXPORT_TRANSPORTABLE_01”: /******** AS SYSDBA directory=dir dumpfile=xtts.dmp TRANSPORT_TABLESPACES=USERS,BIG1,T2,T3 transport_full_check=y exclude=STATISTICS logfile=xtts.log
处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
处理对象类型 TRANSPORTABLE_EXPORT/TABLE
处理对象类型 TRANSPORTABLE_EXPORT/INDEX
处理对象类型 TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
处理对象类型 TRANSPORTABLE_EXPORT/INDEX_STATISTICS
处理对象类型 TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
已成功加载/卸载了主表 “SYS”.“SYS_EXPORT_TRANSPORTABLE_01”


SYS.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
F:EXPDPXTTS.DMP


可传输表空间 BIG1 所需的数据文件:
F:ORADATACSDBBIG01.DBF
可传输表空间 T2 所需的数据文件:
F:ORADATACSDBT201.DBF
F:ORADATACSDBT202.DBF
可传输表空间 T3 所需的数据文件:
F:ORADATACSDBT301.DBF
F:ORADATACSDBT302.DBF
可传输表空间 USERS 所需的数据文件:
F:ORADATACSDBUSERS01.DBF
作业 “SYS”.“SYS_EXPORT_TRANSPORTABLE_01” 已于 13:07:50 成功完成

12、目标端导入表空间

impdp sys/1 directory=dir dumpfile=xtts.dmp transport_datafiles=’+DATA/orcl/datafile/big01.dbf’,’+DATA/orcl/datafile/t202.dbf’,’+DATA/orcl/datafile/t201.dbf’,’+DATA/orcl/datafile/t301.dbf’,’+DATA/orcl/datafile/t302.dbf’,’+DATA/orcl/datafile/users02.dbf’ logfile=xtts.log

—导入表空间时,报错USERS表空间已经存在,需要删除后再次导入
Users表空间为默认永久表空间,删除时先修改默认永久表空间,然后再删除。
查看默认永久表空间:
SQL> set lines 200
SQL> col property_name for a30
SQL> col property_value for a30
SQL> col description for a40
SQL> select * from database_properties where property_name=‘DEFAULT_PERMANENT_TABLESPACE’;

PROPERTY_NAME PROPERTY_VALUE DEscriptION
—————————— —————————— ————————————
DEFAULT_PERMANENT_TABLESPACE USERS Name of default permanent tablespace

—需创建新的表空间做中转表空间:
Create tablespace mew datafile ‘+DATA/orcl/datafile/new.dbf’size 100M;
alter database default tablespace new;
SQL> select * from database_properties where property_name=‘DEFAULT_PERMANENT_TABLESPACE’;

PROPERTY_NAME PROPERTY_VALUE DEscriptION


DEFAULT_PERMANENT_TABLESPACE NEW Name of default permanent tablespace

—进行删除:
drop tablespace USERS including contents and datafiles;

—导入完成后,修改回USERS:
alter database default tablespace users;
SQL> select * from database_properties where property_name=‘DEFAULT_PERMANENT_TABLESPACE’;

PROPERTY_NAME PROPERTY_VALUE DEscriptION
—————————————————— —————————— ————————————
DEFAULT_PERMANENT_TABLESPACE USERS Name of default permanent tablespace

—删除中转表空间:
drop tablespace NEW including contents and datafiles;

—再次导入成功:
impdp sys/1 directory=dir dumpfile=XTTS.DMP transport_datafiles=’+DATA/orcl/datafile/big01.dbf’,’+DATA/orcl/datafile/t202.dbf’,’+DATA/orcl/datafile/t201.dbf’,’+DATA/orcl/datafile/t301.dbf’,’+DATA/orcl/datafile/t302.dbf’,’+DATA/orcl/datafile/users02.dbf’ logfile=xtts.log

import: Release 11.2.0.4.0 - Production on Mon May 24 13:52:16 2021

Copyright © 1982, 2011, Oracle and/or its affiliates、All rights reserved.

UDI-01017: operation generated ORACLE error 1017
ORA-01017: invalid username/password; logon denied

Username: / as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Master table “SYS”.“SYS_import_TRANSPORTABLE_01” successfully loaded/unloaded
Source time zone version is 11 and target time zone version is 14.
Starting “SYS”.“SYS_import_TRANSPORTABLE_01”: /******** AS SYSDBA directory=dir dumpfile=XTTS.DMP transport_datafiles=+DATA/orcl/datafile/big01.dbf,+DATA/orcl/datafile/t202.dbf,+DATA/orcl/datafile/t201.dbf,+DATA/orcl/datafile/t301.dbf,+DATA/orcl/datafile/t302.dbf,+DATA/orcl/datafile/users02.dbf logfile=xtts.log
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job “SYS”.“SYS_import_TRANSPORTABLE_01” successfully completed at Mon May 24 13:52:47 2021 elapsed 0 00:00:24

13、数据校验,收尾阶段

—按用户收集统计信息:
exec dbms_stats.gather_schema_stats(ownname => ‘T1’,degree => 3);
exec dbms_stats.gather_schema_stats(ownname => ‘T2’,degree => 3);
exec dbms_stats.gather_schema_stats(ownname => ‘T3’,degree => 3);
exec dbms_stats.gather_schema_stats(ownname => ‘TEST’,degree => 3);

—收集数据字典信息:
exec DBMS_STATS.GATHER_DICTIONARY_STATS(degree=>3);

—源端和目标端相关对象对比
select owner,count(object_name) from dba_objects where owner in(‘T1’,‘T2’,T3’,‘TEST’);

经对比源端与目标端的查询结果一致。

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。