UBC CPSC304 project.
Go to Oracle's homepage for files and instructions.
It's not possible to directly connect to the dbhost.ugrad.cs.ubc.ca so you'd have to create a tunnel first.
At terminal
cd ~/instantclient_12_2/network/admin/
sudo touch tnsnames.ora
sudo vim tnsnames.ora
oraname.tns
ssh =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ug)
)
)
Create a tunnel
ssh -Y {cs_id}@remote.ugrad.cs.ubc.ca -L1522:dbhost.ugrad.cs.ubc.ca:1522
Use sqlplus with oraname.tns
sqlplus ora_{cs_id}/a{student_number}@ssh
Usle sqlplus without oraname.tns
sqlplus ora_{cs_id}/a{student_number}@localhost:1522/ug
Alternative to sqlplus, SQL developer can be used.
Load TNS file that was created from the above. Use ora_{cs_id}/a{student_number} as id/pw
src/main/resources/application.properties
spring.datasource.username=ora_{cs_id}
spring.datasource.password=a{student_number}
Build gradle to add dependencies to the classpath
gradle build
JAVA 1.8, Springboot 2.0.2.RELEASE, Mybatis 1.3.2, Oracle 11g