mac 数据库文件导入docker

数据库导入docker中

  1. 把文件复制到docker容器中
    • docker cp 2.dmp 3e34dc1dfcd3:/home/oracle
  2. 进入docker容器
    • docker exec -it oracle_11g bash
    • su root su oracle (命令无法时使用的情况是环境变量的问题)
  3. export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (修改语言环境)
  4. imp test/test@helowin file=/data.dmp full=y ignore=y
  5. 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 

猜你喜欢

转载自blog.csdn.net/weixin_41118077/article/details/103385167