Given an Oracle datapump file is it possible to find/retrieve the used tablespaces without accessing the original/source schema?
I tried to use the strings Linux command but I'm unable to find pattern indicating a tablespace.
Any idea?
Given an Oracle datapump file is it possible to find/retrieve the used tablespaces without accessing the original/source schema?
I tried to use the strings Linux command but I'm unable to find pattern indicating a tablespace.
Any idea?
You can use sqlfile option to dump DDL statements to a file.
impdp directory=expdir dumpfile=myexp.dmp sqlfile=myddl.sql
It's similar to get schema names -
strings myexp.dmp | grep TS_NAME | sed -e 's/.*<TS_NAME>\([^<]*\)<\/TS_NAME>.*/\1/g' | sort -u
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.
© 2022 - 2024 — McMap. All rights reserved.
grep TABLESPACE outputfile.sql | sort | uniq | awk -F" " '{print $2}' | uniq
– Cowslip