Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the problems that Oracle remap_schema needs to pay attention to?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report