What are the problems that Oracle remap_schema needs to pay attention to?
This article mainly introduces "what are the problems that Oracle remap_schema needs to pay attention to". In the daily operation, I believe many people have doubts about the problems that Oracle remap_schema needs to pay attention to. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts of "what are the problems that Oracle remap_schema needs to pay attention to?" Next, please follow the editor to study!
Remap_schema needs to pay attention to:
Even if your corresponding schema does not exist, as long as the user connected at the time of import has sufficient permissions, the metadata in the DUMP file will be used to create a corresponding user's / / disallow ordinary users to use the remap_schema option
problem
The first kind:
If you use the hr user to export hr mode (hr does not have DBA permissions)
SQL > expdp hr/hr directory=pump_dir dumpfile=hr.dmp schemas=hr
Perform the import when the new_hr user does not exist:
SQL > impdp system/oracle directory=pump_dir dumpfile=hr.dmp remap_schema=hr:new_hr
In this case, the import fails and the automatic creation of the new_hr fails.
The second kind:
But if you give DBA permissions to the HR user, export again.
SQL > grant dba to hr
SQL > expdp hr/hr directory=pump_dir dumpfile=hr.dmp schemas=hr
Perform the import when the new_hr user does not exist:
SQL > impdp system/oracle directory=pump_dir dumpfile=hr.dmp remap_schema=hr:new_hr
In this case, the import is successful and the new_hr is automatically created.
The third kind:
If you use system or / as sysdba to export hr schema
Expdp system/oracle directory=pump_dir dumpfile=hr_system.dmp schemas=hr
Or
Expdp\'/ as sysdba\ 'directory=pump_dir dumpfile=hr_system.dmp schemas=hr
Perform the import when the new_hr user does not exist:
Impdp system/oracle directory=pump_dir dumpfile=hr_system.dmp remap_schema=hr:new_hr
In this case, the import will be successful and the new_hr will be created automatically.
At this point, the study of "what are the problems that Oracle remap_schema needs to pay attention to" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!