Requirement Analysis:
Migrate the entire table structure, table data, and inter-Table constraints of the source database to the target instance;
Delete all tables and users in the target database and recreate the users in the target database:
Drop user user_name cascade;
Create user user_name identified by password default tablespace tablespace_name;
Grant connect, dba to user_name;
Source database operations:
Export all tables under a specified user in the source database:
Exp username/pwd @ link_name file = dmpfilename owner = user_name rows = y log = fullpath_logfilename
Target database operations:
Do not restrict and index the imported data:
Imp username/pwd @ link_name file = dmpfilename rows = y ignore = y feedback = 10000 constraints = n indexes = n log = fullpath_logfile.log full = y
Import constraints and indexes do not import data
Imp username/pwd @ link_name file = dmpfilename rows = n ignore = y constraints = y indexes = y log = fullpath_logfile.log full = y
Verify migration results
Run the following scripts in the source and target databases respectively.
Select count (*) from user_tables;