Skip to content

Instantly share code, notes, and snippets.

@tekk555
Created March 31, 2022 02:56
Show Gist options
  • Save tekk555/953bb1fc6ab82f7c1230cae58100a814 to your computer and use it in GitHub Desktop.
Save tekk555/953bb1fc6ab82f7c1230cae58100a814 to your computer and use it in GitHub Desktop.
Oracleのスキーマをコピーするスクリプト
(実際に動作するかは試していない)
create user [DEST_SCHEMA] identified by [DEST_SCHEMA] default tablespace USERS temporary tablespace TEMP profile DEFAULT;
grant create session,create table,create view,create sequence,create trigger,create synonym,unlimited tablespace to [DEST_SCHEMA];
expdp system/manager SCHEMAS=[SRC_SCHEMA] DIRECTORY=DATA_PUMP_DIR DUMPFILE=[SRC_SCHEMA].dmp
impdp system/manager DIRECTORY=DATA_PUMP_DIR DUMPFILE=[SRC_SCHEMA].dmp REMAP_SCHEMA=[SRC_SCHEMA]:[DEST_SCHEMA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment