-
-
Save tmarwen/fab2dd0fb642be6e1e75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create directory | |
create directory dmpdir as 'c:/temp'; | |
select directory_name,directory_path from dba_directories; | |
# expdp owner | |
create user scott identified by tiger; | |
grant connect, resource to scott; | |
... | |
grant read, write on directory dmpdir to scott; | |
expdp scott/tiger@xe directory=dmpdir dumpfile=scott.dmp logfile=expdp.log | |
# impdp owner | |
create user new_scott identified by tiger; | |
grant connect, resource to new_scott; | |
grant read, write on directory dmpdir to new_scott; | |
impdp new_scott/tiger@xe directory=dmpdir dumpfile=scott.dmp remap_schema=scott:new_scott logfile=impdp.log | |
# other example | |
expdp system/system@xe directory=dmpdir dumpfile=schemas.dmp logfile=expdp.log schemas=schema1,schema2 | |
impdp system/system@xe directory=dmpdir dumpfile=schemas.dmp logfile=impdp.log table_exists_action=replace schemas=schema1,schema2 | |
impdp system/system@xe directory=dmpdir dumpfile=schemas.dmp logfile=impdp.log table_exists_action=replace schemas=schema1,schema2 remap_tablespace=ts1:new_ts1 remap_schema=schema1:new_schema1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment