This is often the case where data files are exported from Table A in a database and data needs to be imported to table B due to a certain specification or reason. Oracle does not seem to be able to handle this situation, there are no related options in the exp parameter. When the exported file is opened in a text editor, you can see the name of the original tablespace.
We can now create the same tablespace in the target database. After importing data, we move the table and index to the specified tablespace, but the index of the lob cannot be moved, so the problem cannot be completely solved.
Today, we found a simple method to achieve Simplicity:
- First, export the data file according to the normal operation.
- Then, use Vim to open the data file. You cannot use a common text editor, emedit, ut, and so on. This will damage the file structure.
- Use the following command to replace the tablespace name -- % S/tablespace "A"/tablespace "B"/g
- Save launch
- Use the IMP command to import data to the target database (the target database must have a tablespace B)
After testing, data can run normally after being imported to table B.