A. Use impdp and network_link
1. Create a db link in the target database
Create public database link hrtestdb connect to system identified by 1234 using 'hrtestdb ';
Impdp system/1234 network_link = hrtestdb schemas = BMCCZHPUSR;
2. Create a tablespace in the target database to prevent import errors.
3. Import impdp
Use the remap_schema parameter for import between different users
Impdp wj/wj #201209 network_link = hrtestdb schemas = BMCCZHPUSR remap_schema = BMCCZHPUSR: wj
B. Use imp and pipeline Technologies
If 9i or earlier versions are involved, there is no expdp command and only export command, you need to manually create an MPS queue for implementation.
The procedure is as follows:
1. Create an MPS queue
Mknod/tmp/exp. pipe p
2. exp: export data. The command stops at this time and waits for the imp command.
Exp system/1234 file =/tmp/exp. pipe tables = BMCCZHPUSR. RESUME_STUDY
3. Run the imp command on the local machine to import data to the target database.
Imp wj/wj @ epmdb file =/tmp/exp. pipe BUFFER = 159715200 IGNORE = y commit = y fromuser = BMCCZHPUSR touser = wj;
4. Delete the MPs queue file.
Rm-rf/tmp/exp. pipe