How to connect to an Oracle database from IntelliJ IDEA 14?

Can someone tell me how I can manage this connection? I do it like 3 days and every example, every video on the network is connected to a MySQL or SQLite connection to NetBeans. My goal is to put the results of a SELECT query in JTable. Nothing else. I know I need the driver and connection URL, ResultSet, PreparedStatement, TableModel, but I could not find the perfect combination to get some results.

Thank.

+4
source share
2 answers

If you cannot find a tutorial or video that covers all this, you need to combine sources that cover individual parts of the problem.

For instance:

+1
source

IntelliJ. IDE URL- JDBC. Oracle TNS, URL- , Oracle (, RAC) , SERVER=DEDICATED:

jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yourdbhost.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))

jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yourdbhost.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = XE)))

:

jdbc:oracle:thin:@yourdbhost.com:1521:XE

, , , SQL/PLUS

0

Source: https://habr.com/ru/post/1570224/


All Articles