XTTS for Large Databases: Parallel Setup
XTTS for Large Databases: Parallel Setup
Specia Note: For Very Large Database like 500 Terabytes and Least Down Time
Because the below parameters in the [Link] can have value for one location only
1. src_scratch_location
2. dest_scratch_location
3. dest_datafile_location
This is the secret of least down time, for a very large database like 500TB, yes Terabytes
Table of Contents
XTTS, Cross Platform Incremental Transportable Tablespace ............................................................. 0
Most Important Note .......................................................................................................................... 0
XTTS, Cross Platform Incremental Transportable Tablespace ............................................................. 2
Disclaimer............................................................................................................................................ 2
Oracle Metalink Documents Referred................................................................................................. 2
Notes ................................................................................................................................................... 2
Environment........................................................................................................................................ 3
Prerequisites ....................................................................................................................................... 4
Known Issues....................................................................................................................................... 6
ACTION ................................................................................................................................................ 8
Step 2.1 - Run the backup on the source system .............................................................................. 10
Step 2.2 - Transfer the following files to the destination system Backups created from source
src_scratch_location to destination dest_scratch_location............................................................. 14
Step 2.3 - Restore the datafiles on the destination system. ............................................................. 14
Phase 3 - Roll Forward Phase ................................................................................................................ 16
Step 3.1 - Create an incremental backup of the tablespaces being transported on the source
system. .............................................................................................................................................. 16
Step 3.2 - Transfer incremental backups and [Link] to the destination system. .............................. 19
Step 3.3 - Apply the incremental backup to the datafile copies on the destination system. ........... 20
Phase 4 - Final Incremental Backup. ..................................................................................................... 21
Option1.A: Alter source tablespace(s) to READ ONLY in the source database ................................. 23
On the source system, logged in as the oracle user with the environment (ORACLE_HOME and
ORACLE_SID environment variables) pointing to the source database, alter the tablespaces being
transported to READ ONLY. ............................................................................................................... 23
Option1.B: Create the final incremental backup of the tablespaces being transported on the source
system. .............................................................................................................................................. 24
Option1.C: Transfer incremental backups and [Link] to the destination system ............................. 28
Option1.D: Apply last incremental backup to destination datafiles ................................................. 29
Phase 5 - Transport Phase: Export Metadata and Plug-in Tablespaces into Destination Database ...... 30
Option1.B: Transfer the export file to destination directory used by datapump.............................. 31
Option1.C: Run datapump import using the export file on destination to plug in the tablespaces. 31
Step 6.2 Check tablespaces for corruption ....................................................................................... 33
Step 6.3 - Alter the tablespace(s) READ WRITE in the destination database.................................... 34
XTTS, Cross Platform Incremental Transportable Tablespace
Disclaimer
This is just an experiment to validate and practice to gain the
knowledge
I am not saying this would work for you; decision of
implementation goes to you
Please attempt at your own risk
This is a simulated, ideal and pristine set up, so a lot of issues
would not show up
Purpose of this document is to let the reader know, the outcome of
the simulation
XTTS Creates Alias on Destination when Source and Destination use ASM (Doc ID 2351123.1)
Known Issues for Cross Platform Transportable Tablespaces XTTS (Doc ID 2311677.1)
Notes
Source is Little Endian, and Target is Little Endian, I did not find resources to
simulate a Big Endian. Conversion looks ok, and no issues found during this
simulation
If your source and target both are using ASM, obvious production scenario, then please check this
Document ID : 2471245.1
Section : Known Issues
Bullet point number : 2
Dataguard No No
3. The source database's COMPATIBLE parameter must not be greater than the destination
database's COMPATIBLE parameter.
a. show parameter compatible
b. Source is [Link].0
c. Target is 19.0.0
4. The source database must be in ARCHIVELOG mode. Yes, it is in Archive log Mode
6. RMAN configuration
a. RMAN on the source system must not have DEVICE TYPE DISK configured with
COMPRESSED.
b. RMAN on the source system must not have BACKUP TYPE TO COPY. The source must
have BACKUP TYPE TOBACKUPSET.
c. RMAN on the source system must not have default channel configured to type SBT.
I.e., this procedure can only be used with DISK channels.
d. RMAN on the source system must not have ANY channel configuration limitations.
For example, MAXSETSIZE,MAXPIECESIZE, etc.
USER_X_TBSP ONLINE
/u01/app/oracle/oradata/sourcehostdb11g/sol10db11g/user_x_tbsp AVAILABLE ONLINE
.dbf
USER_Y_TBSP ONLINE
/u01/app/oracle/oradata/sourcehostdb11g/sol10db11g/user_y_tbsp AVAILABLE ONLINE
.dbf
USER_Z_TBSP ONLINE
/u01/app/oracle/oradata/sourcehostdb11g/sol10db11g/user_z_tbsp AVAILABLE ONLINE
.dbf
8. Although preferred destination system is Linux (either 64-bit Oracle Linux or a certified
version of RedHat Linux), this procedure can be used with other Unix based operating
systems. However, any non-Linux operating system must be running [Link] or higher in
both destination and source.
a. Not Applicable in this scenario
9. The Oracle version of source must be lower or equal to destination. Therefore, this
procedure can be used as an upgrade method.
a. Source is 11g and Target is 19C
10. Transportable tablespace restrictions WILL apply. Minimum version for source and
destination is [Link]. Earlier 11.2 versions will likely function the same, however were not
tested. As suggested, test the procedure before relying on it for a production environment.
a. The source database version is [Link].0, which earlier than [Link].0 so I
am testing
11. ASM can only be used for final location of datafiles in destination, backups cannot be placed
on ASM with this version. The backup location of destination MUST be a device with
read/write privileges. I.e., cannot be a READONLY device. This can cause ORA-19624 on the
backupset conversion.
a. Here backups will be stored in a disk locally, NAS/NFS with read/write
permission can also be used.
12. The source and target database must use a compatible character set and national character
set.
a. select * from database_properties where PROPERTY_NAME in
('NLS_CHARACTERSET','NLS_NCHAR_CHARACTERSET');
b. In Source
i. NLS_CHARACTERSET : AL32UTF8
ii. NLS_NCHAR_CHARACTERSET : AL16UTF16
c. In Target
i. NLS_CHARACTERSET : AL32UTF8
ii. NLS_NCHAR_CHARACTERSET : AL16UTF16
16. Although NOT recommended, a standby database can be used for this procedure. See Using
XTTs in a Data Guard Environment ( Doc ID 2853054.1 )
a. Source is a standalone database, and this is not part of this experiment
18. No datafiles should be dropped from the tablespaces being migrated once the migration
begins. This can especially be a problem if the datafile number is reassigned to an added
datafile to a migrated tablespace.
a. This recommendation is considered
Known Issues
1. If your source database is running 12c or higher, un-comment the usermantransport
parameter in the [Link] parameter should ONLY be used for an 12c and higher
source.
i.e.,:
Regardless of the destination version, the value of this parameter in the destination's
[Link] must be the SAME as the source.
2. If using ASM in both source and destination, see XTTS Creates Alias on Destination when
Source and Destination use ASM( Note 2351123.1 )
3. If using ASM for datafiles, an error deleting file system file using ASMCMD can be ignored.
(unpublished Bug 29268792, currently open)
a. I did not see it, in my case
4. The existence of a [Link], in either source or destination, can cause syntax errors.
a. $ORACLE_HOME/sqlplus/admin/[Link] ,
b. If the script is there it should be an empty file
c. For my test case scripts are there and I did not see any issues while doing the tests
5. For other known issues, see other issues within Known Issues for Cross Platform
Transportable Tablespaces XTTS (Note2311677.1 ).
9. Backup creation parallelism is defined by RMAN configuration for DEVICE TYPE DISK
PARALLELISM. For incremental backups (after Level 0), parallelism is on the tablespace level.
a. CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; #
default, so no impact on this POC
10. If the target database character set is not compatible with source database character set the
following error may occur at tablespace plug-in (phase 5):
ORA-39123: Data Pump transportable tablespace job aborted
ORA-19736: cannot plug a tablespace into a database using a different national character set
V4 Transport Tablespaces with Reduced Downtime using Cross Platform Incremental Backup
a. ------------- Not Applicable in this POC
ACTION
On the source system, as the oracle software owner, download and extract the supporting scripts
rman_xttconvert_VER4.[Link]
bash-3.2$ pwd
/export/home/oracle/xtt
bash-3.2$ ls -ltr
total 82
-rw-r--r-- 1 oracle oinstall 41929 Mar 8 13:17 rman_xttconvert_VER4.[Link]
bash-3.2$
bash-3.2$
bash-3.2$ unzip rman_xttconvert_VER4.[Link]
Archive: rman_xttconvert_VER4.[Link]
inflating: [Link]
inflating: [Link]
inflating: [Link]
inflating: [Link]
inflating: [Link]
inflating: [Link]
extracting: [Link]
## tablespaces
## -----------
## Comma separated list of tablespaces to transport from source database to destination database.
## Do NOT use quotes
## Specify tablespace names in CAPITAL letters.
## Be sure there are NO space between the names
tablespaces=USER_P_TBSP
####### Make sure this directory is created already in destination, if not using ASM
## DESTINATION system file locations
## =================================
##
## dest_datafile_location
## -------------
##
## This is the FINAL location of the datafiles to be used by the destination database.
## Be sure there are NO TRAILING space
## Location where the converted datafile copies will be written in the destination.
## If using ASM, this should be set to the disk group name:
## dest_datafile_location=+DATA
dest_datafile_location=+FRADATA
usermantransport=1 -
It is recommended this be set if the source database is running 12c or higher.
This causes new 12c (and higher) functionality to be used when this parameter is set.
NOTE: regardless of the destination version, the value of this parameter in the destination's
[Link] must be
the SAME as the source
## userrmantransport
## -----------------
## This should be set if using 12c or higher.
#usermantransport=1
## END
Step 1.6 - Copy xttconvert scripts and [Link] to the destination system
As the oracle software owner copy all xttconvert scripts and the modified
[Link] file to the destination system.
[oracle@source_host]$ scp -r /export/home/oracle/xtt
oracle@target_host:/home/oracle/xtt
============================================================
trace file is
/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//Mar10_Mon_03_37_09_890_.log
=============================================================
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
Key: platformid
Values: 20
Key: src_scratch_location
Values: /u01/app/oracle/backup/
Key: parallel
Values: 3
Key: rollparallel
Values: 2
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: dest_datafile_location
Values: +FRADATA
Key: tablespaces
Values: USER_P_TBSP
Key: getfileparallel
Values: 4
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
ORACLE_SID : sourcehostdb11g
ORACLE_HOME : /u01/app/oracle/product/[Link]/db_1
112000
PRIMARY
Running on PRIMARY
--------------------------------------------------------------------
Starting prepare phase
--------------------------------------------------------------------
Parallel:3
scalar(or1
XXX: adding here for 1, 0, USER_P_TBSP
XXX: adding proper here for index 0, b4 added 'USER_P_TBSP'
,
--------------------------------------------------------------------
Find list of datafiles in system
--------------------------------------------------------------------
sqlplus -L -s / as sysdba
@/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//[Link] +FRADATA
::USER_P_TBSP6,+FRADATA/USER_P_TBSP_6.dbf
--------------------------------------------------------------------
Done finding list of datafiles in system
--------------------------------------------------------------------
/ as sysdba
size of tablespace 1
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare source for Tablespaces:
'USER_P_TBSP' /u01/app/oracle/backup/
[Link] for 'USER_P_TBSP' started at Mon Mar 10 03:37:10 2025
#PLAN:USER_P_TBSP::::997982
#CONVERT:host 'echo ts::USER_P_TBSP';
#CONVERT: convert from platform 'Solaris Operating System (x86-64)'
#CONVERT: datafile
backup as copy tag 'prepare' datafile
#CONVERT: '/u01/app/oracle/backup//USER_P_TBSP_6.tf'
6
#PLAN:6
#CONVERT: format '+FRADATA/%N_%[Link]'
#CONVERT: parallelism 3;
format '/u01/app/oracle/backup//%N_%[Link]';
/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//[Link]
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> #PLAN:USER_P_TBSP::::997982
2> #CONVERT:host 'echo ts::USER_P_TBSP';
3> #CONVERT: convert from platform 'Solaris Operating System (x86-64)'
4> #CONVERT: datafile
5> backup as copy tag 'prepare' datafile
6> #CONVERT: '/u01/app/oracle/backup//USER_P_TBSP_6.tf'
7> 6
8> #PLAN:6
9> #CONVERT: format '+FRADATA/%N_%[Link]'
10> #CONVERT: parallelism 3;
11> format '/u01/app/oracle/backup//%N_%[Link]';
12>
RMAN-03090: Starting backup at 10-MAR-25
RMAN-06009: using target database control file instead of recovery catalog
RMAN-08030: allocated channel: ORA_DISK_1
RMAN-08500: channel ORA_DISK_1: SID=37 device type=DISK
RMAN-08580: channel ORA_DISK_1: starting datafile copy
RMAN-08522: input datafile file number=00006
name=/u01/app/oracle/oradata/sourcehostdb11g/sol10db11g/user_p_tbsp.dbf
RMAN-08586: output file name=/u01/app/oracle/backup/USER_P_TBSP_6.tf tag=PREPARE
RECID=2 STAMP=1195357054
RMAN-08581: channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
RMAN-03091: Finished backup at 10-MAR-25
/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//[Link]
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN>
--------------------------------------------------------------------
Done with prepare phase
--------------------------------------------------------------------
/ as sysdba
size of tablespace 3
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare newscn for Tablespaces: 'USER_P_TBSP'
Number of tb arrays is 1
::USER_P_TBSP:::SCN:::9982546=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/[Link]: ::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/[Link]: 6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//[Link]:
::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/backup_Mar10_Mon_03_37_09_890//[Link]:
6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
Writing new 6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
============================================================
No new datafiles added
=============================================================
In the example below, scp is used to transfer the level=0 backup created by the previous step
from the source system to the destination system.
-----Done
============================================================
trace file is
/home/oracle/xtt/restore_Mar10_Mon_23_44_50_58//Mar10_Mon_23_44_50_58_.log
=============================================================
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
Key: dest_datafile_location
Values: +FRADATA
Key: platformid
Values: 20
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: parallel
Values: 3
Key: rollparallel
Values: 2
Key: tablespaces
Values: USER_P_TBSP
Key: src_scratch_location
Values: /u01/app/oracle/backup/
Key: getfileparallel
Values: 4
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
ORACLE_SID : LINUX19DB
ORACLE_HOME : /u01/app/oracle/product/19.3.0/db1
190000
#0:::6,20,USER_P_TBSP_6.dbf,0,997982,0,0,0,USER_P_TBSP,USER_P_TBSP_6.dbf
--------------------------------------------------------------------
Performing convert for file 6
--------------------------------------------------------------------
/home/oracle/xtt/restore_Mar10_Mon_23_44_50_58//rman_convert_USER_P_TBSP_6.cmd
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
YYY:
During this phase an incremental backup is created from the source database, transferred to the
destination system, converted to the destination system endian format, then applied to the
converted destination datafile copies to roll them forward.
This phase may be run multiple times. Each successive incremental backup should take less time than
the prior incremental backup, and will bring the destination datafile copies more current with the
source database.
The data being transported (source) is fully accessible during this phase.
NOTE: Multiple backups can be executed against the source without applying them to the
destination.
The backup files and the [Link] must be copied before the '--restore' is executed at the destination.
NOTE: The script will shut down and startup, in NOMOUNT, the destination database before the --
restore.
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
Key: platformid
Values: 20
Key: src_scratch_location
Values: /u01/app/oracle/backup/
Key: parallel
Values: 3
Key: rollparallel
Values: 2
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: dest_datafile_location
Values: +FRADATA
Key: tablespaces
Values: USER_P_TBSP
Key: getfileparallel
Values: 4
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
ORACLE_SID : sourcehostdb11g
ORACLE_HOME : /u01/app/oracle/product/[Link]/db_1
112000
PRIMARY
Running on PRIMARY
--------------------------------------------------------------------
Backup incremental
--------------------------------------------------------------------
scalar(or1
XXX: adding here for 1, 0, USER_P_TBSP
XXX: adding proper here for index 0, b4 added 'USER_P_TBSP'
,
Number of tb arrays is 1
::USER_P_TBSP:::SCN:::9982546=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/[Link]: ::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/[Link]:
6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
/export/home/oracle/xtt/backup_Mar10_Mon_04_20_21_896//[Link]:
::USER_P_TBSP:::SCN:::998254
/export/home/oracle/xtt/backup_Mar10_Mon_04_20_21_896//[Link]:
6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
Writing new 6=998254,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
============================================================
No new datafiles added
=============================================================
/ as sysdba
size of tablespace 1
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare newscn for Tablespaces: 'USER_P_TBSP'
USER_P_TBSP::::998254 6
TABLESPACE STRING :''''
Prepare newscn for Tablespaces: ''''
--------------------------------------------------------------------
Starting incremental backup
--------------------------------------------------------------------
/export/home/oracle/xtt/backup_Mar10_Mon_04_20_21_896//[Link]
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights
reserved.
ts::USER_P_TBSP
RMAN-06134: host command complete
--------------------------------------------------------------------
Done backing up incrementals
--------------------------------------------------------------------
/ as sysdba
size of tablespace 3
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare newscn for Tablespaces: 'USER_P_TBSP'
bash-3.2$ pwd
/export/home/oracle/xtt
bash-3.2$
bash-3.2$ ls -ltr [Link]
-rw-r--r-- 1 oracle oinstall 37 Mar 10 04:20 [Link]
bash-3.2$
bash-3.2$ cat [Link]
/u01/app/oracle/backup//023jvfc9_1_1
bash-3.2$
bash-3.2$
bash-3.2$ scp `cat [Link]` oracle@target_host:/u01/app/oracle/backup
oracle@target_host's password:
023jvfc9_1_1 100%
|*********************************************************************************************
********************| 40960 00:00
bash-3.2$
However, the [Link] file MUST be copied after the LAST incremental backup before it can be applied
on destination (step 3.3).
Step 3.3 - Apply the incremental backup to the datafile copies on the
destination system.
On the destination system, logged in as the oracle user with the environment (ORACLE_HOME and
ORACLE_SID environment variables) pointing to the destination database, run the roll forward
datafiles step as follows:
The roll forward step connects to destination database and applies the incremental backups on the
tablespaces' datafiles for each tablespace being transported.
NOTE: Although multiple backups can be executed against the source without being applied on the
destination, the [Link] must be copied after the last backup and before the '--restore' is executed at
the destination.
============================================================
trace file is
/home/oracle/xtt/restore_Mar11_Tue_00_19_59_727//Mar11_Tue_00_19_59_727_.log
=============================================================
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: tablespaces
Values: USER_P_TBSP
Key: getfileparallel
Values: 4
Key: platformid
Values: 20
Key: parallel
Values: 3
Key: dest_datafile_location
Values: +FRADATA
Key: rollparallel
Values: 2
Key: src_scratch_location
Values: /u01/app/oracle/backup/
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
ORACLE_SID : LINUX19DB
ORACLE_HOME : /u01/app/oracle/product/19.3.0/db1
190000
YYY: USER_P_TBSP_6.dbf::6:::1=023jvfc9_1_1
--------------------------------------------------------------------
Start rollforward
--------------------------------------------------------------------
BEFORE ROLLPLAN
datafile number : 6
AFTER ROLLPLAN
--------------------------------------------------------------------
End of rollforward phase
--------------------------------------------------------------------
After the destination datafiles are made consistent, the normal transportable tablespace steps are
performed to export object metadata from the source database and import it into the destination
database.
The data being transported is accessible only in READ ONLY mode until the end of this phase.
There are two options for this phase if you are running 12c and higher. If you are running 11g, only
option #1is available.
AS WE ARE EXPERIMENTING, lets create a table and insert a record in it, before putting the
tablespace into read only mode.
SQL> select object_name, object_type from dba_objects where owner='USER_P' order by 2,1;
OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
COUNTRY_C_ID_PK INDEX
DEPT_ID_PK INDEX
DEPT_LOCATION_IX INDEX
EMP_DEPARTMENT_IX INDEX
EMP_EMAIL_UK INDEX
EMP_EMP_ID_PK INDEX
EMP_JOB_IX INDEX
EMP_MANAGER_IX INDEX
EMP_NAME_IX INDEX
JHIST_DEPARTMENT_IX INDEX
JHIST_EMPLOYEE_IX INDEX
JHIST_EMP_ID_ST_DATE_PK INDEX
JHIST_JOB_IX INDEX
JOB_ID_PK INDEX
LOC_CITY_IX INDEX
LOC_COUNTRY_IX INDEX
LOC_ID_PK INDEX
LOC_STATE_PROVINCE_IX INDEX
REG_ID_PK INDEX
ADD_JOB_HISTORY PROCEDURE
SECURE_DML PROCEDURE
DEPARTMENTS_SEQ SEQUENCE
EMPLOYEES_SEQ SEQUENCE
LOCATIONS_SEQ SEQUENCE
COUNTRIES TABLE
DEPARTMENTS TABLE
EMPLOYEES TABLE
JOBS TABLE
JOB_HISTORY TABLE
LOCATIONS TABLE
REGIONS TABLE
SECURE_EMPLOYEES TRIGGER
UPDATE_JOB_HISTORY TRIGGER
EMP_DETAILS_VIEW VIEW
34 rows selected.
Table created.
35 rows selected.
TABLESPACE_NAME
------------------------------
USER_P_TBSP
Tablespace altered.
On the source system, logged in as the oracle user with the environment (ORACLE_HOME and
ORACLE_SID environment variables) pointing to the source database, run the backup as follows:
=============================================================
--------------------------------------------------------
------------
Parsing properties
--------------------------------------------------------
------------
Key: platformid
Values: 20
Key: src_scratch_location
Values: /u01/app/oracle/backup/
Key: parallel
Values: 3
Key: rollparallel
Values: 2
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: dest_datafile_location
Values: +FRADATA
Key: tablespaces
Values: USER_P_TBSP
Key: getfileparallel
Values: 4
--------------------------------------------------------
------------
Done parsing properties
--------------------------------------------------------
------------
--------------------------------------------------------
------------
Checking properties
--------------------------------------------------------
------------
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
--------------------------------------------------------
------------
Done checking properties
--------------------------------------------------------
------------
ORACLE_SID : sourcehostdb11g
ORACLE_HOME : /u01/app/oracle/product/[Link]/db_1
112000
PRIMARY
Running on PRIMARY
--------------------------------------------------------
------------
Backup incremental
--------------------------------------------------------
------------
scalar(or1
XXX: adding here for 1, 0, USER_P_TBSP
XXX: adding proper here for index 0, b4 added
'USER_P_TBSP'
,
Number of tb arrays is 1
::USER_P_TBSP:::SCN:::10004756=1000475,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
::USER_P_TBSP:::SCN:::1000475
/export/home/oracle/xtt/[Link]:
::USER_P_TBSP:::SCN:::1000475
/export/home/oracle/xtt/[Link]:
6=1000475,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
/export/home/oracle/xtt/backup_Mar10_Mon_05_05_02_786//[Link]:
::USER_P_TBSP:::SCN:::1000475
/export/home/oracle/xtt/backup_Mar10_Mon_05_05_02_786//[Link]:
6=1000475,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
Writing new
6=1000475,USER_P_TBSP,+FRADATA/USER_P_TBSP_6.dbf
============================================================
No new datafiles added
=============================================================
/ as sysdba
size of tablespace 1
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare newscn for Tablespaces: 'USER_P_TBSP'
USER_P_TBSP::::1000475 6
TABLESPACE STRING :''''
Prepare newscn for Tablespaces: ''''
--------------------------------------------------------
------------
Starting incremental backup
--------------------------------------------------------
------------
/export/home/oracle/xtt/backup_Mar10_Mon_05_05_02_786//[Link]
ts::USER_P_TBSP
RMAN-06134: host command complete
--------------------------------------------------------
------------
Done backing up incrementals
--------------------------------------------------------
------------
/ as sysdba
size of tablespace 3
No. of tablespaces per batch 1
TABLESPACE STRING :'USER_P_TBSP'
Prepare newscn for Tablespaces: 'USER_P_TBSP'
DECLARE*
ERROR at line 1:
ORA-20001: TABLESPACE(S) IS READONLY OR,
OFFLINE JUST CONVERT, COPY
ORA-06512: at line 284
####################################################################
Warning:
------
Warnings found in executing
/export/home/oracle/xtt/backup_Mar10_Mon_05_05_02_786//[Link]
####################################################################
DECLARE*
ERROR at line 1:
ORA-20001: TABLESPACE(S) IS READONLY OR,
OFFLINE JUST CONVERT, COPY
ORA-06512: at line 284
TABLESPACE STRING :''''
Prepare newscn for Tablespaces: ''''
bash-3.2$ pwd
/export/home/oracle/xtt
bash-3.2$
bash-3.2$
bash-3.2$ ls -ltr
total 544
-rw-r--r-- 1 oracle oinstall 1390 May 24 2017
[Link]
-rw-r--r-- 1 oracle oinstall 52 May 24 2017
[Link]
-rw-r--r-- 1 oracle oinstall 11710 May 24 2017 [Link]
-rw-r--r-- 1 oracle oinstall 71 May 24 2017 [Link]
-rw-r--r-- 1 oracle oinstall 5169 Feb 19 2019 [Link]
-rw-r--r-- 1 oracle oinstall 180408 Jul 7 2019 [Link]
-rw-r--r-- 1 oracle oinstall 41929 Mar 8 13:17
rman_xttconvert_VER4.[Link]
-rw-r--r-- 1 oracle oinstall 5350 Mar 10 03:20 [Link]
-rw-r--r-- 1 oracle oinstall 43 Mar 10 03:37
[Link]
-rw-r--r-- 1 oracle oinstall 198 Mar 10 03:37 [Link]
drwxr-xr-x 2 oracle oinstall 512 Mar 10 03:37
backup_Mar10_Mon_03_37_09_890
drwxr-xr-x 2 oracle oinstall 1024 Mar 10 04:20
backup_Mar10_Mon_04_20_21_896
-rw-r--r-- 1 oracle oinstall 79 Mar 10 05:05 [Link]
-rw-r--r-- 1 oracle oinstall 27 Mar 10 05:05 [Link]
-rw-r--r-- 1 oracle oinstall 32 Mar 10 05:05 [Link]
-rw-r--r-- 1 oracle oinstall 37 Mar 10 05:05 [Link]
-rw-r--r-- 1 oracle oinstall 232 Mar 10 05:05 [Link]
-rw-r--r-- 1 oracle oinstall 27 Mar 10 05:05 [Link]
drwxr-xr-x 2 oracle oinstall 1024 Mar 10 05:05
backup_Mar10_Mon_05_05_02_786
bash-3.2$ cat [Link]
/u01/app/oracle/backup//043jvi01_1_1
bash-3.2$
bash-3.2$
This step will apply the last incremental backup to the datafiles on the destination.
----------------------------------------------------------------
----
Parsing properties
----------------------------------------------------------------
----
Key: dest_scratch_location
Values: /u01/app/oracle/backup/
Key: dest_datafile_location
Values: +FRADATA
Key: getfileparallel
Values: 4
Key: tablespaces
Values: USER_P_TBSP
Key: rollparallel
Values: 2
Key: src_scratch_location
Values: /u01/app/oracle/backup/
Key: platformid
Values: 20
Key: parallel
Values: 3
----------------------------------------------------------------
----
Done parsing properties
----------------------------------------------------------------
----
----------------------------------------------------------------
----
Checking properties
----------------------------------------------------------------
----
ARGUMENT tablespaces
ARGUMENT platformid
ARGUMENT backupformat
----------------------------------------------------------------
----
Done checking properties
----------------------------------------------------------------
----
ORACLE_SID : LINUX19DB
ORACLE_HOME : /u01/app/oracle/product/19.3.0/db1
190000
YYY: USER_P_TBSP_6.dbf::6:::1=043jvi01_1_1
----------------------------------------------------------------
----
Start rollforward
----------------------------------------------------------------
----
BEFORE ROLLPLAN
datafile number : 6
AFTER ROLLPLAN
----------------------------------------------------------------
----
End of rollforward phase
----------------------------------------------------------------
----
cat user_p.par
dumpfile=[Link]
directory=data_dump
exclude=TABLE_STATISTICS,INDEX_STATISTICS
transport_tablespaces=user_p_tbsp
transport_full_check=yes
logfile=tts_export.log
expdp parfile=user_p.par
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 11g Enterprise Edition Release [Link].0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01": /******** AS SYSDBA parfile=user_p.par
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TRANSPORTABLE_EXPORT/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/COMMENT
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TRIGGER
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:
/u01/app/oracle/dump/[Link]
******************************************************************************
Datafiles required for transportable tablespace USER_P_TBSP:
/u01/app/oracle/oradata/sourcehostdb11g/sol10db11g/user_p_tbsp.dbf
Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 05:29:19
For example:
[oracle@target_host]$ cat manual_imp.par
dumpfile= [Link]
directory=data_dump
transport_datafiles='+FRADATA/USER_P_TBSP_6.dbf'
logfile=tts_import.log
Before doing the import set the environment variable as below to point the import job to PDB
export ORACLE_PDB_SID=<PDB_NAME>
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Password:
Connected to: Oracle Database 19c Enterprise Edition Release [Link].0 - Production
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01": /******** AS SYSDBA parfile=manual_imp.par
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
At this step, the transported data is READ ONLY in the destination database. Perform application
specific validation to verify the transported data.
Also, run RMAN to check for physical and logical block corruption by running VALIDATE TABLESPACE
as follows:
in Target PDB
FILE_NAME
--------------------------------------------------------------------------------
+FRADATA/LINUX19DB/2FCB39CE06AC0B75E065524DE5264FBD/DATAFILE/system.275.1195194469
+FRADATA/LINUX19DB/2FCB39CE06AC0B75E065524DE5264FBD/DATAFILE/sysaux.276.1195194469
+FRADATA/LINUX19DB/2FCB39CE06AC0B75E065524DE5264FBD/DATAFILE/undotbs1.274.11951944
69
+FRADATA/LINUX19DB/2FCB39CE06AC0B75E065524DE5264FBD/DATAFILE/users.278.1195194543
+FRADATA/user_p_tbsp_6.dbf
The final step is to make the destination tablespace(s) READ WRITE in the destination database.
Tablespace altered.
The usermantransport parameter in xtt.properties must have the same version on both source and destination databases to ensure compatibility during transportable tablespace operations. This parameter affects the way data transport is managed and differences might lead to errors or inconsistencies, thus using the same version helps maintain synchronization in data handling across platforms .
Setting the tablespace to 'READ ONLY' mode ensures that no further modifications are made to the data, maintaining consistency between source and destination data during the migration. This setting is critical as it allows the creation and application of a final incremental backup that synchronizes the data at both ends. The document describes altering the source tablespace to 'READ ONLY' after creating a dummy table for testing, and this is essential in the phase where metadata is exported and imported to the destination .
For transportable tablespace migration, both the source and target databases must use compatible character sets and national character sets. This ensures data consistency and integrity during the migration process. In the given scenario, both source and target databases use AL32UTF8 for NLS_CHARACTERSET and AL16UTF16 for NLS_NCHAR_CHARACTERSET, which matches the requirement .
Using a standalone database without a standby configuration eliminates redundancy and recovery options available in a Data Guard environment. This raises potential risks during migration, such as data loss or increased downtime if any part of the process fails. While not part of this experiment, utilizing a standby database could provide a safety net, allowing recovery and continuity in case of migration issues that could not be managed in a standalone setup .
Once the migration process has begun, no datafiles should be dropped from the tablespaces being migrated. If a datafile is dropped and its number is reassigned to a newly added datafile, it can cause problems with the migration's data integrity. This recommendation is crucial to maintaining the consistency and reliability of the migration process .
Non-Linux operating systems must be running Oracle version 12.1.0.1 or higher, both at the source and destination, to use the transportable tablespace feature. This is necessary to ensure compatibility and functionality during migration .
Using OS authentication via an Oracle user who is a member of the OSDBA group is important for maintaining the appropriate security and permissions needed to execute the migration process successfully. This ensures necessary administrative access rights are in place for interactions with both source and destination databases, facilitating secure data handling .
When using ASM for database migration, it is necessary to ensure that backups are not placed on ASM devices since ASM can only be used as the final location for datafiles. Instead, backups should be stored locally or on NAS/NFS systems with read/write permissions to avoid errors like ORA-19624 .
The RMAN convert command is essential for enhancing datafile compatibility when migrating across different platforms with differing file structures. This feature allows for the conversion of datafile formats to ensure they are compatible with the destination platform's architecture, supporting a seamless transition and maintaining data accessibility post-migration .
During the incremental backup phase, an initial backup set is created from the source database, capturing all changes up to the point of backup initiation. This phase ensures that any new updates after the initial full backup are captured incrementally, allowing the destination to be kept in sync with the source. This process maintains the consistency between source and destination databases, enabling a smoother final synchronization before the data migration is considered complete .