数据库导入docker中
- 把文件复制到docker容器中
- docker cp 2.dmp 3e34dc1dfcd3:/home/oracle
- 进入docker容器
- docker exec -it oracle_11g bash
- su root su oracle (命令无法时使用的情况是环境变量的问题)
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (修改语言环境)
- imp test/test@helowin file=/data.dmp full=y ignore=y
- exp test/test@helowin file=/home
dcker镜像内文件复制到本地
docker cp 容器进程ID:文件/文件夹路径 主机目的路径
查看oracle的本地tnsnames.ora文件
vi /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/tnsnames.ora