You also need to configure an appropriate Oracle url. This has the format:
jdbc:oracle:thin:@<hostname>:<port number>:<schema name>
for example:
jdbc:oracle:thin:@10.101.180.9:1521:TestDB
In order for your Java application to connect to your Oracle database you need some code which’ll look a bit like this:
try {
Class.forName(driverName);
con = DriverManager.getConnection(url, userName, password);
} catch (SQLException e) {
No comments:
Post a comment