Hi Stefan,

Thank you for your answer.
Initially the issue was somewhere between Linux Red Hat 7 and QGIS because the 
same error was when I tried to connect to Oracle using isql.

The reason fro this issue was a known Red hat issue.
Let me explain:
Oracle ODBC driver is libsqora.so.11.1. This file exists in my system under 
/usr/lib/oracle/11.2/client64/lib/.
I have run on a terminal ldd command like bellow.
ldd /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1

In one of the result line was: libodbcinst.so.1 => not found.

So I have created a symbolic link from /usr/lib64/libodbcinst.so.1 to 
/usr/lib64/libodbcinst.so.2.

This fix made my Oracle client workable from isql and sqlplus.

But QGIS still not able to add Oracle layer because the icon does not exists in 
QGIS Browser and ODBC still has the error:
Connection failed - Check settings and try again

Extended error information:
Unable to initialize ODBC connection to DSN for USER/PASS@CAAR,
[unixODBC][Driver Manager] Datasource name not found, and no default driver 
specified

So right now someone who knows the QGIS code should see why Oracle connectivity 
icon does not exist in QGIS 2.8.2 Linux Red Hat and why ODBC does not work when 
it tries to connect to Oracle.

Thanks,
Marian

From: Blumentrath, Stefan [mailto:[email protected]]
Sent: June-26-15 3:20 AM
To: Tudorache, Marian; [email protected]; [email protected]
Subject: RE: Not able to connect to Oracle via ODBC

I had a similar issue with unixODBC and MS SQL.
If I am not mistaken, the «host" parameter overrides the «Provider/DSN» 
parameter. It does so for MS SQL, at least.
For MS SQL it helped to leave the "host" parameter empty and only use 
Provider/DSN.

However, there does not seem to be a "Provider/DSN" parameter for neither "Add 
Oracle Spatial Layer" nor ODBC, ...

A Bug?

Cheers
Stefan

From: 
[email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Tudorache, Marian
Sent: 25. juni 2015 23:04
To: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: [Qgis-user] Not able to connect to Oracle via ODBC

Hello,

What I am trying to do: Add a vector layer from an remote Oracle database.

Description:
I tried to add a vector layer using ODBC connectivity to an Oracle database on 
QGIS 2.8.2.
Add vector Layer
Choose Database
Type ODBC
Click New
I filled the form as:
Type ODBC
Name: myODBCConnection
Host: ssfdata
Database: CAAR
Port: 1521
Username: USER
Password: PASS

When I clicked Test Connection I got:
Connection failed - Check settings and try again

Extended error information:
Unable to initialize ODBC connection to DSN for USER/PASS@CAAR,
[unixODBC][Driver Manager] Datasource name not found, and no default driver 
specified

I opened a terminal window and I typed:
Isql -v caarODBC
I was able to connect to my database
+------------------------+
| Connected            |
|                              |
| sql -statement     |
| help [tablename] |
| quit                       |
+------------------------+
SQL>

So the unixODBC driver works for the database but QGIS is not able to access 
via ODBC.

Is any special settings related qgis to make ODBC working?

Thanks,
marian

________________________________
This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le présent message électronique et tout fichier qui peut y être joint peuvent 
contenir des renseignements privilégiés ou confidentiels destinés à l'usage 
exclusif des personnes ou des organismes à qui ils s'adressent. Si vous avez 
reçu ce message électronique par erreur, veuillez en informer l'expéditeur 
immédiatement et supprimez le. Toute reproduction, divulgation ou distribution 
du présent message électronique est strictement interdite. NAV CANADA n'assume 
aucune responsabilité en cas de dommage causé par tout virus ou autre programme 
malveillant transmis par ce message électronique.
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to