<div dir="ltr">Thanks Julien for your suggestions. I don't think I managed to make it work like that.<div>Is there anyone who has connected QGIS to an Oracle DB with a proxy user?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 14 nov 2023 alle ore 08:56 Julien Cabieces <<a href="mailto:julien.cabieces@oslandia.com">julien.cabieces@oslandia.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
In order to set the environment variable, you can follow this procedure<br>
[0]<br>
<br>
Regarding the Oracle client version, It is either oci-19-8 or oci-19-11<br>
[1], but I would say that both has to work the same way.<br>
<br>
[0] <a href="https://www.howtogeek.com/787217/how-to-edit-environment-variables-on-windows-10-or-11/" rel="noreferrer" target="_blank">https://www.howtogeek.com/787217/how-to-edit-environment-variables-on-windows-10-or-11/</a><br>
[1] <a href="http://download.osgeo.org/osgeo4w/v2/x86_64/release/oci/" rel="noreferrer" target="_blank">http://download.osgeo.org/osgeo4w/v2/x86_64/release/oci/</a><br>
<br>
Regards,<br>
Julien<br>
<br>
<br>
> Yes I have also tried using the tnsnames.ora alternative, byut in that case I have a doubt about where to set the TNS_ADMIN, in case of a<br>
> standard Win 11 QGis installation. Could you suggest ? Also, what is the Oracle client / version used by QGis? Thanks<br>
><br>
> Il giorno lun 13 nov 2023 alle ore 10:33 Julien Cabieces via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> ha scritto:<br>
><br>
>  Hi,<br>
><br>
>  Did you try to use a tnsnames.ora file ?<br>
><br>
>  You can then set the environment variable TNS_ADMIN to point to the<br>
>  directory which contains the file and then refer to the connexion in<br>
>  QGIS with the "database name" (dbname in QGIS uri), no host and port<br>
>  specified.<br>
><br>
>  I have no expertise in configuring the tnsnames.ora file, but when I<br>
>  have to face complicated connexion, I generally ask for tnsnames.ora and<br>
>  go this way to make it work.<br>
><br>
>  Regards,<br>
>  Julien<br>
><br>
>  > Hi,<br>
>  ><br>
>  > I have to connect to Oracle DBs for my work with a "proxy" user (security requirements) and I normally make it with SQLDeveloper,<br>
>  setting it up<br>
>  > like:<br>
>  ><br>
>  > username: MY_USER[DB_USER]<br>
>  > password: << MY_USER password >><br>
>  > connection type: Base<br>
>  > host: << DB host address >><br>
>  > port: << DB port >><br>
>  > service: << DB service name >><br>
>  ><br>
>  > where MY_USER is my personal user, while DB_USER is the name of the schema where DB tables are present. The DB is an Oracle 12g and<br>
>  is<br>
>  > v21, but in order to make this work I had to setup SQLDeveloper preferences so to use an external Oracle client (instantclient) and the<br>
>  > Thick/OCI driver. Also, compatibility with the oracle client needs to be taken care of. I use the Oracle instant client 21.11 and<br>
>  SQLDeveloper<br>
>  > 21.4.1.<br>
>  ><br>
>  > I'm trying to replicate such an Oracle connection in QGIS, but simply setting up the connection details as above, it fails with:<br>
>  ><br>
>  > ORA-01017 invalid username/password<br>
>  ><br>
>  > I've searched a lot already and tried some variations in the QGIS connection setup, but I haven't been able to solve my problem. Oracle<br>
>  proxy<br>
>  > user connection doesn't seem to be supported in QGIS, does it?<br>
>  ><br>
>  > Can someone here help me?<br>
>  > thanks in advance<br>
>  > Fabio<br>
>  ><br>
>  > _______________________________________________<br>
>  > QGIS-User mailing list<br>
>  > <a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
>  > List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>  > Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
><br>
>  -- <br>
><br>
>  Julien Cabieces<br>
>  Senior Developer at Oslandia<br>
>  <a href="mailto:julien.cabieces@oslandia.com" target="_blank">julien.cabieces@oslandia.com</a><br>
>  _______________________________________________<br>
>  QGIS-User mailing list<br>
>  <a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
>  List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>  Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br>
<br>
-- <br>
<br>
Julien Cabieces<br>
Senior Developer at Oslandia<br>
<a href="mailto:julien.cabieces@oslandia.com" target="_blank">julien.cabieces@oslandia.com</a><br>
</blockquote></div>