oracle oracle如何清空数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10437879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:47:08  来源:igfitidea点击:

how to empty a database in oracle

databaseoracle

提问by ericyoung

We have an old database in oracle 10g. we want to replace it with the new dmp file (that is what we have). Can I simply drop the old database, then run the impdp to create a new one? We are not worried about the data in the old database. Could you give me the steps to do that?

我们在 oracle 10g 中有一个旧数据库。我们想用新的 dmp 文件(这就是我们所拥有的)替换它。我可以简单地删除旧数据库,然后运行 ​​impdp 来创建一个新数据库吗?我们不担心旧数据库中的数据。你能告诉我这样做的步骤吗?

采纳答案by DCookie

As has been stated in the comments, you can just drop the user with cascade, then import the user.

正如评论中所述,您可以使用级联删除用户,然后导入用户。

If you created an export with the older exp command, and it was an export of just one user/schema, then you will likely have to create the user/schema manually before running the imp. exp/imp were not as smart about that as expdp/impdp.

如果您使用较旧的 exp 命令创建了一个导出,并且它只是一个用户/模式的导出,那么您可能必须在运行 imp 之前手动创建用户/模式。exp/imp 在这方面不如 expdp/impdp 聪明。