Data transfer is a common problem in system deployment. How can we achieve efficient transfer and transmission of massive Oracle Data? The following describes how to deploy the postal resource visualization system.
I. Use a tablespace for Transmission
Restrictions: A. Only data can be transmitted. User stored procedures, functions, and physical views cannot be transmitted.
B. The tablespace must be self-contained. Objects in the tablespace or group of tablespaces are not related to objects in other tablespaces, such as indexes and constraints.
C.8i or later.
D. Same hardware platform. Different hardware platforms need to convert the byte sequence.
Check Method: execute dbms_tts.transport_set_check (ts_list => 'local', incl_constraints => TRUE );
The ts_list parameter is used to specify the tablespace to be moved. incl_constraints is used to specify whether to check integrity constraints.
After dbms_tts.transport_set_check is executed, information about the self-contained tablespace is saved to the temporary table transport_set_violations. If no information is returned when querying this table, the tablespace is self-contained.
1. Read-only the tablespace to be transferred.
Alter tablespace ts_vir read only;
Alter tablespace vir_olap read only;
Alter tablespace qs_map read only;
Alter tablespace yzwd read only;
2. copy the data file copy data and copy the data file corresponding to the tablespace to the target database.
3. Export the data dictionary information of the tablespace.
Exp "'/as sysdba'" tablespaces = vir_olap, ts_vir, qs_map, yzwd transport_tablespace = y file = vir_metadata.dmp
4. Make the tablespace readable and writable. Alter tablespace VIR read write;
5. Create a user for the target database.
Create user vir identified by vir;
Create user vir_olap identified by vir;
Create user qs_map identified by qs_map;
Create user yzwd identified by yzwd;
6. grant permissions. Grant resource, connect to vir, vir_olap, qs_map, yzwd;
7. Import the tablespace information to the target database.
Imp "'/as sysdba'" tablespaces = vir_olap, QS_MAP, ts_vir, YZWD transport_tablespace = y file = vir_metadata.dmp datafiles =/u01/apps/oracle/oradata/orcl/vir_olap.ora ,/
/U01/apps/oracle/oradata/orcl/vir_olap1.ora ,/
/U01/apps/oracle/oradata/orcl/vir_olap2.ora ,/
/U01/apps/oracle/oradata/orcl/vir_olap3.ora ,/
/U01/apps/oracle/oradata/orcl/vir_olap4.ora ,/
/U01/apps/oracle/oradata/orcl/ts_vir.ora ,/
/U01/apps/oracle/oradata/orcl/QS_MAP.dbf ,/
/U01/apps/oracle/oradata/orcl/YZWD. dbf
8. Make the tablespace readable and writable. Alter tablespace VIR read write;