Oracle Migration Table Space ____oracle

Source: Internet
Author: User
Portable Table Space transport tablespacePortable table Space
The ability to move large amounts of data between databases using the properties of the portable tablespace (transportable tablespaces) is much faster than Export/import and Unload/load, Because it migrates tablespaces, it only needs to copy data files and insert tablespace metadata into the target database.
Migrating a tablespace is particularly useful for the following applications:
Move OLTP data into the data warehouse in phases
Updating data warehouses and datasets
To load a dataset from the Data Warehouse Center
Effectively archive data warehouses and OLTP
Publish data to internal or external customers
Perform Point-in-time table space Recovery (TSPITR)
Limit
The source database and the target database must have the same hardware platform
The source database and the destination database must have the same character set and national character set
Cannot migrate table space with the same name as the destination database already exists
Migration Tablespace does not support materialized views/replication, functional indexing, Environment refs,8.0 compliant advanced queues with multiple receivers
Consider compatibility
To use this attribute, the compatible in the initialization parameters of the source database and the target database must be set to 8.1 or higher, and the compatible in the initialization parameters of the target database must be set to 9.0 or higher if the block size of the migrated tablespace is different from the standard size. Without having to have the source database the same version as the target database, Oracle guarantees compatibility, and if not, the error message is given at the beginning of the insert.
Migrating from older versions of database data to a newer version of the target database is always possible.
Migration process
Ø extracted from the contained table space set
There is a logical or physical dependency between database objects, and the self-contained table space set means that no objects in this tablespace set are dependent on external objects. Examples of illegal self-contained rules are as follows:
1 There is an index that depends on the table space outside the tablespace set to migrate
2 The partition table is only partially included in the set to migrate the table space
3 Referential integrity constraints cross the boundary of the table space set to migrate
4 to migrate a table space set contains a LOB field that points outside the table space set
You can use the Dbms_tts package to check the self-inclusion of a tablespace set, and you can set the Tts_full_check parameter to true for strict checking to perform a execute_catalog_role role that must be assigned to it.
To check tablespace Sales_1 and sales_2 are self-contained, execute:
EXECUTE dbms_tts.transport_set_check (' sales_1,sales_2 ', TRUE);
After the check is performed, the view can be transport_set_violations, and the view should be empty if it is self-contained.
SELECT * from Transport_set_violations;
Ø Create a portable table space set
Create a portable table space set use the following steps:
1 Modify the migrated table space set to read-only
ALTER tablespace sales_1 READ only;
ALTER tablespace sales_2 READ only;
2 export table space set meta data
EXP transport_tablespace=y tablespaces= (sales_1,sales_2)
Triggers=y constraints=n grants=n file=expdat.dmp
If you want to perform a check of TSPITR and stricter constraints, execute:
EXP transport_tablespace=y tablespaces= (sales_1,sales_2)
Tts_full_check=y file=expdat.dmp
Ø Migration Table Space Set
Move data files and exported metadata to a location where the target database can be accessed,
Ø Insert Table Space set
Insert Table space Structure information:
IMP Transport_tablespace=y File=expdat.dmp
datafiles= ('/db/sales_jan ', '/db/sales_feb ',...)
Tablespaces= (sales_1,sales_2) tts_owners= (Dcranney,jfee)
Fromuser= (Dcranney,jfee) touser= (smith,williams)
The options specified here are:
Transport_tablespace=y indicates that you want to migrate table spaces
file contains table space meta data
Table space name specified as Sales_1,sales_2
Tts_owners Specifies that all users who have data in a tablespace set
Fromuser and Touser specify that the owner of the database object be changed, without specifying that all of their data objects are created under the same user as the source data.
If the insertion completes, all the inserted tablespaces are read-only and can be changed:
ALTER tablespace sales_1 READ WRITE
ALTER tablespace sales_1 READ WRITE
If you have a very large number of data files, and you specify too much effort in a single statement, you can write an import parameter file, for example:
IMP parfile= ' Par.f '

The file Par.f contains the following contents:
Transport_tablespace=y
File=expdat.dmp
datafiles= ('/db/sales_jan ', '/db/sales_feb ',...)
Tablespaces= (sales_1,sales_2)
Tts_owners= (Dcranney,jfee)
Fromuser= (Dcranney,jfee)
Touser= (Smith,williams)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.