oracle 查找数据泵转储文件中使用的表空间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13117797/
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
Find tablespaces used within datapump dump file
提问by Andrea de Palo
Given an Oracle datapump file is it possible to find/retrieve the used tablespaces without accessing the original/source schema?
给定一个 Oracle 数据泵文件,是否可以在不访问原始/源模式的情况下查找/检索使用过的表空间?
I tried to use the stringsLinux command but I'm unable to find pattern indicating a tablespace.
我尝试使用stringsLinux 命令,但找不到指示表空间的模式。
Any idea?
任何的想法?
回答by Rob van Laarhoven
You can use sqlfile option to dump DDL statements to a file.
您可以使用 sqlfile 选项将 DDL 语句转储到文件中。
impdp directory=expdir dumpfile=myexp.dmp sqlfile=myddl.sql
回答by Sergey Alekhin
It's similar to get schema names -
它类似于获取模式名称 -
strings myexp.dmp | grep TS_NAME | sed -e 's/.*<TS_NAME>\([^<]*\)<\/TS_NAME>.*//g' | sort -u
回答by JosueXIX
So the export will be inside the myexp.dmp file, but sometimes it is helpful to add in that same line the following log: myexp_log_file.log; this will provide the entire scope of what the export/import did.
因此导出将在 myexp.dmp 文件中,但有时在同一行中添加以下日志会很有帮助:myexp_log_file.log; 这将提供导出/导入所做的整个范围。