This content has been marked as final. Show 11 replies
Your "DUMP" are dumped by exp? or expdp?
If exp, you can open dump file and check user and tablespace.
Or imp rows=N/impdp CONTENT=METADATA_ONLY
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.1 person found this helpful
It will generate ddl file and you will be able to know username.
I understand that idea, but i wanna take the case, that you have only a dump file no logs nothing , only a dump file
and i want to run import in a user different from the one in the dump file
i had use expdb this the only information about the dump nothing else
i just want to import that dump with a user different from the user in the dump and the same for tablespace name
Hi,1 person found this helpful
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.1 person found this helpful
Thank you guys , its too long but it is efficient , one question can i only put in the sqlfile the user create statement
to the impdp with the sqlfile - that should exclude everything else.
Thank you for the answer
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.