Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Oracle connection with TNS alias #4225

Closed
pahervin opened this issue Aug 19, 2024 · 6 comments
Closed

[Bug]: Oracle connection with TNS alias #4225

pahervin opened this issue Aug 19, 2024 · 6 comments
Assignees
Labels
bug Hop Gui P2 Default Priority
Milestone

Comments

@pahervin
Copy link

Apache Hop version?

2.8

Java version?

openJdk 11.0.2

Operating system

Windows

What happened?

In the Metadata tab, set a Relational Database Connection

  1. Set the Connection name
  2. Set the Connection type : Oracle
  3. Use the default provided Driver
  4. Set the Username and the Password
  5. Set the connection URL with the ojbdc alias syntax : jdbc:oracle:thin:@my_alias
  6. In Options tab, set JDBC option : oracle.net.tns_admin=my_path_to_tnsnames.ora_directory
  7. Set leave empty the other fields
  8. Check the TNS_ADMIN environnement variable is properly set
  9. Click on the Test button

The connection attempt produce an exception.
This connection URL is used successfully with other java tools (sqldevelopper, Talend).

  1. Change the Connection URL : jdbc:oracle:thin:@my_alias?TNS_ADMIN=my_path_to_tnsnames.ora_directory
  2. Click again on the Test button

The connection attempt produce an exception again.

  1. Change the Connection URL : jdbc:oracle:thin:@my_hostname:1521:my_SID
  2. Click again on the Test button

The connection is established successfully.

Issue Priority

Priority: 2

Issue Component

Component: Hop Gui

@github-actions github-actions bot added P2 Default Priority Hop Gui labels Aug 19, 2024
@pahervin pahervin changed the title [Bug]: [Bug]: Oracle connection with TNS alias Aug 20, 2024
@nadment
Copy link
Contributor

nadment commented Aug 22, 2024

I connected successfully using this method with a JDBC 19 driver and using the manual url. Apache Hop does not pass options in the url for Oracle.

image

This connection method is not in the Hop documentation, it should be added.

nadment added a commit to nadment/hop that referenced this issue Aug 22, 2024
@hansva
Copy link
Contributor

hansva commented Aug 22, 2024

shouldn't we fix the add options then?

@nadment
Copy link
Contributor

nadment commented Aug 22, 2024

I don't know, maybe it's changed since this implementation was made.

  /**
   * Oracle doesn't support options in the URL, we need to put these in a Properties object at
   * connection time...
   */
  @Override
  public boolean isSupportsOptionsInURL() {
    return false;
  }

@hansva
Copy link
Contributor

hansva commented Aug 22, 2024

Ok, guess this might need some further investigation then. Might have changed from old drivers. Might be that some do have to be in the URL and other don't ...

@nadment
Copy link
Contributor

nadment commented Aug 22, 2024

I haven't found any indication that it supports parameters in the url.
https://www.oracle.com/database/technologies/faq-jdbc.html

hansva added a commit that referenced this issue Aug 23, 2024
Add doc for Oracle connection with TNS_ADMIN #4225
@hansva
Copy link
Contributor

hansva commented Aug 28, 2024

Let's close this one. The original problem has been handled.
We could create a feature request to add extra fields to the dialog to support TNS names. But it will not be part of this bug.

@hansva hansva closed this as completed Aug 28, 2024
@hansva hansva added this to the 2.10 milestone Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Hop Gui P2 Default Priority
Projects
None yet
Development

No branches or pull requests

3 participants