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

Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection #38979

Closed
Jean-Roc opened this issue Sep 23, 2020 · 9 comments · Fixed by #39131
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Regression Something which used to work, but doesn't anymore

Comments

@Jean-Roc
Copy link
Member

Description

Creating or editing an Oracle connection with the data source manager is not possible with a version > 3.10.x, the validation control is greyed out

How to Reproduce

  1. Go to Data Source manager > Oracle
  2. Create or edit a connection
  3. Set all the required parameters and test the connection
  4. Try to click the button "OK" to save or update the connection

QGIS and OS versions

Last version tested that works -> 3.10.3
Last version tested -> 3.15.0-Master 9305e22
Other versions tested 3.12 3.14

@Jean-Roc Jean-Roc added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 23, 2020
@gioman gioman added the Regression Something which used to work, but doesn't anymore label Sep 23, 2020
@uclaros
Copy link
Contributor

uclaros commented Sep 23, 2020

It's working fine for me, I'm on 02f5c13 on Linux Debian.
The OK button is greyed out only if I have not completed the Database field.

@gioman gioman added the Feedback Waiting on the submitter for answers label Sep 23, 2020
@Jean-Roc
Copy link
Member Author

@uclaros here is the same connection on 3.15 (left) and 3.10 (right)

oracle_connection_bug

@uclaros
Copy link
Contributor

uclaros commented Sep 24, 2020

Your host field is empty, if it's a local connection just enter localhost

@Jean-Roc
Copy link
Member Author

Filling it with localhost will trigger an error with the client : ORA-12154 : TNS: could not resolve the connect identifier specified, these parameters were used at least since QGIS 2.x. Most of the configuration is done through a single common file where all the hosts and ports are defined.

@uclaros
Copy link
Contributor

uclaros commented Sep 24, 2020

Can you connect if you supply the host address, the database, the port,, the schema and credentials?

@Jean-Roc
Copy link
Member Author

Jean-Roc commented Sep 25, 2020

If I fill in the hostname I'll get the aforementioned ORA :

  • 3.10.x no host but connection possible
  • 3.12 - 3.15 no host and connection impossible

When I provide an hostname such as localhost in QGIS, it conflicts with the one set in the ADDRESS_LIST / HOST of the *.ora file of our organization. If I add manually the correct hostname, it would connect but then if the IT admin change it in the global file it would break all the connections.

@uclaros
Copy link
Contributor

uclaros commented Sep 25, 2020

So if I get this right, the problem is that you are unable to connect using tnsnames.ora instead of host/port/database?
The Oracle equivalent of #38197 ?
Could you adjust the title accordingly, if so?

@Jean-Roc Jean-Roc changed the title Oracle - can't create or a modify a connection Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection Sep 27, 2020
@Jean-Roc
Copy link
Member Author

The contrary : forcing to specify the host conflicts with tnsname.ora, I'm able to connect if I leave the host field blank (in 3.10 and earlier).

@troopa81
Copy link
Contributor

troopa81 commented Oct 1, 2020

It's related to #35838 but the main issue is that there is no service field in oracle new connection dialog like there is in Postgres. For now, if you didn't set a host the database name was considered as a service name. But since #35838 the check prevents from setting database name without an host, which is quite normal.

I'll propose a PR to fix this.

troopa81 added a commit to troopa81/QGIS that referenced this issue Oct 2, 2020
rldhont added a commit to rldhont/QGIS that referenced this issue May 11, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to qgis#39131 _[Oracle] Fix new connection greyed ok button_ to fix
qgis#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
rldhont added a commit to rldhont/QGIS that referenced this issue May 11, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to qgis#39131 _[Oracle] Fix new connection greyed ok button_ to fix
qgis#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
nyalldawson pushed a commit that referenced this issue May 12, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to #39131 _[Oracle] Fix new connection greyed ok button_ to fix
#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
qgis-bot pushed a commit that referenced this issue May 12, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to #39131 _[Oracle] Fix new connection greyed ok button_ to fix
#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
qgis-bot pushed a commit that referenced this issue May 12, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to #39131 _[Oracle] Fix new connection greyed ok button_ to fix
#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
nyalldawson pushed a commit that referenced this issue May 16, 2022
User can set database without host and port, meaning he is using a service (tnsnames.ora)

The QGIS User Interface forced the port to not be empty even if the database is set and the host is empty.

It is an addition to #39131 _[Oracle] Fix new connection greyed ok button_ to fix
#38979 _Oracle - add/edit connection dialog forces hostname input - conflicts with Oracle Network Connection_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants