Use Oracle on Docker for Windows
Environment | version |
---|---|
WSL | 2 |
Docker Engine | v19.03.13 |
Oracle Database | Enterprise 12.2.0.1 |
Install WLS2
Check detailed and official document here.
Problems I encountered
1. Use any commands related to WSL2 will cause error: “The attempted operation is not supported for the type of object referenced.”
This is beacause the proxy software conflicts with the sock port of WSL2.
Short term solution
Run command line as admin:
1 | netsh winsock reset |
Then reboot computer.
Long term solution
Download NoLsp.exe here.
Run command line as admin:
1 | <Location of NoLsp.exe> C:\windows\system32\wsl.exe |
Install Docker and Oracle
Download docker desktop and pull the image like in this post.
Use SQL Developer
Directly download and connection to the database.
Problem I encountered
1. Invalid username / password
I’m still a newbie to database. I still don’t know why this happened. But the solution to this is to create a new user account in database system directly in docker. Then reboot and we can use the new accout to login.
Command to create a new user account:
1 | SQL> alter session set "_ORACLE_SCRIPT"=true; |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Dash's Blog!
评论