This paper is implemented by EXP/IMP, the database table space needs to be in read-only mode, and for the production database of real-time application, it can be used to transfer table space using Rman method.
The following restrictions apply to the execution of table space transfers:
(1) The source database and the target database must be on the same platform, and 10g can then modify the data file with the Rman command to achieve cross-platform mobile table space.
(2) The source database version must be lower than the target database for both the source and target database versions.
(3) Both the database character set and the national character set must be identical.
(4) The target database cannot have a tablespace with the same name.
1. Querying Oracle-supported platform transitions
Sql> Col Platform_name for A40;
Sql> SELECT * from V$transportable_platform order by 3;
platform_id Platform_name Endian_format
----------- ---------------------------------------- --------------
6 aix-based Systems (64-bit) Big
IBM Power Based Linux Big
2 Solaris[tm] OE (64-bit) Big
4 HP-UX IA (64-bit) Big
Apple Mac OS Big
1 Solaris[tm] OE (32-bit) Big
9 IBM zSeries Based Linux Big
3 HP-UX (64-BIT) Big
Operating Solaris System (x86) Little
Solaris Operating System (x86-64) Little
Microsoft Windows x86 64-bit Little
Linux x86 64-bit Little
8 Microsoft Windows IA (64-bit) Little
HP IA Open VMS Little
Linux IA (64-bit) Little
5 HP Tru64 UNIX Little
Ten Linux IA (32-bit) Little
7 Microsoft Windows IA (32-bit) Little
HP Open VMS Little
2. Create test table spaces and test users, tables
sql> Create tablespace Tjoa datafile '/u01/app/oracle/oradata/orcl/tjoa.dbf ' size 10m autoextend on next 10m;
Sql> create user ABC identified by ABC default tablespace TJOA;
Sql> Grant Connect,resource to ABC;
Sql> Conn ABC/ABC
Sql> CREATE TABLE T as select * from All_objects;
3. Check for self-containment
Sql> Conn/as SYSDBA
Sql> Execute Dbms_tts.transport_set_check (ts_list=> ' Tjoa ', incl_constraints=>true);
Sql> select * from Transport_set_violations;
Set table Space Read-only
Sql> alter tablespace Tjoa Read only;
Sql> Select Tablespace_name, status from dba_tablespaces where Tablespace_name = ' Tjoa ';
Tablespace_name STATUS
------------------------------ ---------
Tjoa READ only
Sql>
4. Perform the export
EXP \ '/as SYSDBA \ ' File=tjoa.dmp transport_tablespace=y Tablespaces=tjoa buffer=10240000
by EXPDP Way:
EXPDP \ '/as SYSDBA \ ' Dumpfile=tjoa.dmp directory=dump_dir Transport_tablespaces=tjoa
5. The Source library sets the tablespace to read-write status
Sql> alter tablespace Tjoa Read write;
6. Analog Platform Conversion
No conversion is required on the Windows/linux platform.
Examples of converting files using the Convert command for Rman are as follows:
$ Rman Target/
Rman> convert tablespace Tjoa to platform ' Linux IA (32-bit) ' format '/u01/%u ';
7. Copy the table space converted data files and export files to the target platform
SCP Tjoa.dmp 192.168.233.160:/home/oracle
SCP tjoa.dbf 192.168.233.160:/u01/app/oracle/oradata/orcl/
8. Create the user ABC in the target database first
Sql> create user ABC identified by ABC;
Sql> Grant Connect,resource to ABC;
9. Import Table Space
IMP \ '/as SYSDBA \ ' File=tjoa.dmp transport_tablespace=y Tablespaces=tjoa datafiles=/u01/app/oracle/oradata/orcl/ Tjoa.dbf
by IMPDP Way:
IMPDP \ '/as SYSDBA \ ' Dumpfile=tjoa.dmp directory=dump_dir transport_datafiles=/u01/app/oracle/oradata/orcl/tjoa.dbf Remap_schema=tjoa:tjoa
10. Target Library Configuration
sql> ALTER USER ABC default tablespace TJOA;
Sql> Select Tablespace_name, status from dba_tablespaces where Tablespace_name = ' Tjoa ';
Sql> alter tablespace Tjoa Read write;
Sql> Conn/as sysdba;
Connected.
sql> ALTER USER ABC default tablespace TJOA;
User altered.
Sql> Select Tablespace_name, status from dba_tablespaces where Tablespace_name = ' Tjoa ';
Tablespace_name STATUS
------------------------------ ---------
Tjoa READ only
Sql>
Sql>
Sql> alter tablespace Tjoa Read write;
Tablespace altered.
Sql>
Sql> Select Tablespace_name, status from dba_tablespaces where Tablespace_name = ' Tjoa ';
Tablespace_name STATUS
------------------------------ ---------
Tjoa ONLINE
Sql>
This article is from the "Koumm Linux Technology blog" blog, be sure to keep this source http://koumm.blog.51cto.com/703525/1574822
Oracle Transport Table Space Migration database