- 首先在win10系统中安装docker软件,注册docker hub账号等前期工作。
- 在Windows PowerShell中输入一下命令拉去Oracle镜像:
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g - 启动oracle镜像作为容器:
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g - 进入镜像配置:docker exec -it oracle11g bash
- 配置环境变量:
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SID=helowin export PATH=$ORACLE_HOME/bin:$PATH
- 依次执行以下命令,创建一个用户
sqlplus /nolog
conn /as sysdba;
alter user system identified by oracle; //这里是把system用户密码设为oracle
conn system/oracle;
create user lhq identified by lihanqing; //注意这里user后面是你设置的用户名,by后面是你设置的密码
问题:在用PL/SQL进行登录时,出现:”ora-01045 :user system lacks create session privilege; logon denied”。
原因:该用户没有创建session会话的权限。
cmd
sqlplus / as sysdba;
grant create session to UserName;(UserName是登录出错的用户名)



