Mac database file import docker

Import the database into docker

  1. Copy the file to the docker container
    • docker cp 2.dmp 3e34dc1dfcd3:/home/oracle
  2. Enter the docker container
    • docker exec -it oracle_11g bash
    • su root su oracle (when the command cannot be used, it is a problem of environment variables)
  3. export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (modify locale)
  4. imp test/test@helowin file=/data.dmp full=y ignore=y
  5. exp test/test@helowin file=/home

Copy the files in the dcker image to the local

docker cp container process ID: file/folder path host destination path

View oracle's local tnsnames.ora file

        vi /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/tnsnames.ora 

Guess you like

Origin blog.csdn.net/weixin_41118077/article/details/103385167