I am writing import dump, the dump is exported from user that i don't know it and tablespace i don't know it.
How can i for the import dump , from the user and tablespace inside the dump to my customized user
Thanks a lot,
Thank you for interaction, Ok the dump was exported with expdb
my pupose is to automate the import , so is there any option to tell the import command to use the fromuser (from the dump).
if there is solution with exp and imp why not i will use exp for export
If you want to know username whose dump is being taken you can check it from the export log and if you don't have access of that you can import via using SQLFILE options.
It will generate ddl file and you will be able to know username.
i think you'll need a script of some sort to do this.
part 1 - impdp sqlfile=xxx
part 2 grep out the schema name and tablespace name from the sqlfile
part 3 build up impdp command using information from part 2
The script describe in here is probably the best way to do what you need done. The sqlfile will give you all of the commands that would be executed so you can see tablespace clauses and schemas. Then you can just do the remap_schema and the remap_tablespace.
If you wanted to do this by a sql query, you could do this:
impdp ... master_only=y job_name=my_master
select unique object_schema from my_master where process_order > 0 and duplicate = 0;
This will give you a list of schemas in the dump file.