Skip to content

Instantly share code, notes, and snippets.

@ivarkol
Created September 7, 2023 14:00
Show Gist options
  • Save ivarkol/12f3302bfeefca913f1ad312bac1b141 to your computer and use it in GitHub Desktop.
Save ivarkol/12f3302bfeefca913f1ad312bac1b141 to your computer and use it in GitHub Desktop.
Oracle export/import
1. Скачать и распаковать архивы
https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-basic-linux.x64-19.20.0.0.0dbru.zip
https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-tools-linux.x64-19.20.0.0.0dbru.zip
2. выполнить команды
export LD_LIBRARY_PATH=/<path_to_instant_client>/instantclient_19_20:${LD_LIBRARY_PATH}
export PATH=/<path_to_instant_client>/instantclient_19_20:${PATH}
3. экспортировать схему
exp <schema_name>/<schema_user_password>@<connection_url> owner=<schema_name> file=filename.dmp
4. импортировать схему
imp <schema_name>/<schema_user_password>@<connection_url> fromuser=<schema_name> touser=<schema_name> file=filename.dmp
например, imp system/oracle@localhost:1521/XE fromuser=SCHEMA_NAME touser=SCHEMA_NAME file=filename.dmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment