Import the database into docker
- Copy the file to the docker container
- docker cp 2.dmp 3e34dc1dfcd3:/home/oracle
- 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)
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (modify locale)
- imp test/test@helowin file=/data.dmp full=y ignore=y
- 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