Skip to content

Setup for Intermediate DB Assignment (Python Tkinter frontend run on WSL Ubuntu 20.04 LTS, XLaunch GUI Interface with SQL PLUS and DOCKER RUN Oracle Express DB)

Notifications You must be signed in to change notification settings

junxian428/PYTHON_TKINTER_WSL_VcXsrv_SQLPLUS_OracleExpressDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

#PYTHON_TKINTER_WSL_VcXsrv_SQLPLUS_OracleExpressDB

Final Result

image

Frontend - Python Tkinter

Display Server X-Launch URL (https://sourceforge.net/projects/vcxsrv/)

-> export DISPLAY=192.168.0.133:0.0

HELLO WORLD PROGRAM

python3 -c "import tkinter as tk; root = tk.Tk(); root.mainloop()"

image

Host Machine - WSL Ubuntu 20.04 LTS

DB Client SQL Plus (WSL Ubuntu 20.04 LTS) - refer (https://askubuntu.com/questions/159939/how-to-install-sqlplus)

  1. sudo apt-get install alien

sudo alien -i oracle-instantclient*-basic*.rpm

sudo alien -i oracle-instantclient*-sqlplus*.rpm

sudo alien -i oracle-instantclient*-devel*.rpm

sudo apt-get install libaio1

Create Oracle configuration file:

sudo sensible-editor /etc/ld.so.conf.d/oracle.conf

Put this line in that file:

/usr/lib/oracle//client/lib/

Note - for 64-bit installations, the path will be:

/usr/lib/oracle//client64/lib/

Update the configuration by running following command:

sudo ldconfig

Try to connect using:

sqlplus username/password@//dbhost:1521/SID or:

sqlplus testuser/password

Oracle DB (Docker) - https://hub.docker.com/r/gvenzl/oracle-xe

image

-- Way to connect Oracle Express DB sqlplus system/123@//localhost:1521/XEPDB1

image

DB Table

CREATE TABLE EMPLOYEES ( EMPLOYEE_ID NUMBER PRIMARY KEY, FIRST_NAME VARCHAR2(50), LAST_NAME VARCHAR2(50) NOT NULL, HIRE_DATE DATE, SALARY NUMBER(10,2), DEPARTMENT_ID NUMBER );

INSERT INTO employees (employee_id, first_name, last_name, hire_date, salary, department_id) VALUES (1001, 'John', 'Doe', SYSDATE, 5000, 10);

COMMIT;

SQL> DESc EMPLOYEES Name Null? Type


EMPLOYEE_ID NOT NULL NUMBER FIRST_NAME VARCHAR2(50) LAST_NAME NOT NULL VARCHAR2(50) HIRE_DATE DATE SALARY NUMBER(10,2) DEPARTMENT_ID NUMBER

About

Setup for Intermediate DB Assignment (Python Tkinter frontend run on WSL Ubuntu 20.04 LTS, XLaunch GUI Interface with SQL PLUS and DOCKER RUN Oracle Express DB)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages