diff --git a/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java b/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java index af26acb0..be5ad9e6 100644 --- a/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java +++ b/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java @@ -200,20 +200,9 @@ public static Connection connectToOracle(String server, String domain, String us // If fails, try THIN driver: if (error != null) try { - String host = "127.0.0.1"; - String sid = server; - String port = "1521"; - if (server.contains("/")) { - host = server.split("/")[0]; - if (host.contains(":")) { - port = host.split(":")[1]; - host = host.split(":")[0]; - } - sid = server.split("/")[1]; - } OracleDataSource ods; ods = new OracleDataSource(); - ods.setURL("jdbc:oracle:thin:@" + host + ":" + port + ":" + sid); + ods.setURL("jdbc:oracle:thin:@" + server); ods.setUser(user); ods.setPassword(password); return ods.getConnection(); diff --git a/rabbit-core/src/main/java/org/ohdsi/databases/RichConnection.java b/rabbit-core/src/main/java/org/ohdsi/databases/RichConnection.java index 17f691e7..3833c4ce 100644 --- a/rabbit-core/src/main/java/org/ohdsi/databases/RichConnection.java +++ b/rabbit-core/src/main/java/org/ohdsi/databases/RichConnection.java @@ -155,7 +155,7 @@ public List getTableNames(String database) { } else if (dbType == DbType.ORACLE) { query = "SELECT table_name FROM " + "(SELECT table_name, owner FROM all_tables UNION ALL SELECT view_name, owner FROM all_views) tables_views " + - "WHERE owner='" + database.toUpperCase() + "'"; + "WHERE owner='" + database.toUpperCase() + "' ORDER BY table_name"; } else if (dbType == DbType.POSTGRESQL || dbType == DbType.REDSHIFT) { query = "SELECT table_name FROM information_schema.tables WHERE table_schema = '" + database.toLowerCase() + "' ORDER BY table_name"; } else if (dbType == DbType.MSACCESS) { diff --git a/whiterabbit/src/main/java/org/ohdsi/whiteRabbit/WhiteRabbitMain.java b/whiterabbit/src/main/java/org/ohdsi/whiteRabbit/WhiteRabbitMain.java index b0a44fd8..3fa6cfa5 100644 --- a/whiterabbit/src/main/java/org/ohdsi/whiteRabbit/WhiteRabbitMain.java +++ b/whiterabbit/src/main/java/org/ohdsi/whiteRabbit/WhiteRabbitMain.java @@ -328,7 +328,7 @@ private JPanel createLocationsPanel() { addAllButton.setEnabled(sourceIsDatabase); if (sourceIsDatabase && selectedSourceType.equals("Oracle")) { - sourceServerField.setToolTipText("For Oracle servers this field contains the SID, servicename, and optionally the port: '/', ':/', '/', or ':/'"); + sourceServerField.setToolTipText("For Oracle servers this field contains the connection string for the OCI/THIN driver. eg. 'jdbc:oracle:oci:@', 'jdbc:oracle:thin:@'"); sourceUserField.setToolTipText("For Oracle servers this field contains the name of the user used to log in"); sourcePasswordField.setToolTipText("For Oracle servers this field contains the password corresponding to the user"); sourceDatabaseField.setToolTipText("For Oracle servers this field contains the schema (i.e. 'user' in Oracle terms) containing the source tables"); @@ -585,7 +585,7 @@ public void actionPerformed(ActionEvent e) { switch (event.getItem().toString()) { case "Oracle": - targetServerField.setToolTipText("For Oracle servers this field contains the SID, servicename, and optionally the port: '/', ':/', '/', or ':/'"); + targetServerField.setToolTipText("For Oracle servers this field contains the connection string for the OCI/THIN driver. eg. 'jdbc:oracle:oci:@', 'jdbc:oracle:thin:@'"); targetDatabaseField.setToolTipText("For Oracle servers this field contains the schema (i.e. 'user' in Oracle terms) containing the source tables"); break; case "PostgreSQL":