Discussion:
[Qgis-user] Re: Connect to Oracle Spatial with QGIS
G. Allegri
2011-09-30 23:26:49 UTC
Permalink
Hi Sandro,
in my experience the GDAL/OGR driver for Oracle (OCI driver) doesn't work
very well. It depends on what you need it for, but for example it was a pain
vieweing an Oracle layer in QGis. I don't know if things have improved.
In Java based projects the drivers are generelly better (i.e. Gvsig, Kosmo,
etc.) maybe because it's easier to mantin them rather then the OCI (C/C++)
interface.

Anyway, the first thing to do is to download the Oracle Client drivers from
Oracle [1]. After having installed it you will find the required libraries
for GDAL to use the driver. I have only experience with Oracle for Windows,
where for Oracle 11g the DLL is oraociei11.dll

If GDAL find the shared library on the bin path, it will activate the OCI
driver, and that's the end. At this point you can use an Oracle layer
thorugh whatever client using GDAL.

Giovanni

[1]
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Lady and Gentlemen,
Sorry if I'm being intrusive! I got your emails in a thread.
I am trying to connect to Oracle Spatial with QGIS (Why Kosmo can do it?).
I have already sent several emails to Oracle, OSGeo, gdal.org, qgisbrasil.
And I've read various threads of the QGIS forums. But I did not succeed!
I know you will say to me: Use GDAL / OGR or OSGeo4W package! I've
installed it!
And I ask you: And now? How to use?
I'm not a developer! I am a common GIS user!
1 - Where to find what I need!
2 - How to install them!
3 - How to configure QGIS to use them!
4 - How to connect Oracle Spatial through QGIS!
Can anyone help me?
Sandro Costa
Brazil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-user/attachments/20110929/7bba284e/attachment.html
G. Allegri
2011-09-30 23:41:52 UTC
Permalink
Exactly the same thing I do. I forgot to say that, thx Duarte ;)
The only thing I can add is that when I want to use in QGIS some format
that GDAL/OGR supports but there?s no GUI for it in QGIS, I create a VRT
file. This file can have all the Oracle connection details, can be tested on
the command line, and then loaded in QGIS.****
** **
Duarte****
** **
*Enviada:* quinta-feira, 29 de Setembro de 2011 16:37
*Para:* Sandro Costa
*Assunto:* Re: Connect to Oracle Spatial with QGIS****
** **
Hi Sandro,****
in my experience the GDAL/OGR driver for Oracle (OCI driver) doesn't work
very well. It depends on what you need it for, but for example it was a pain
vieweing an Oracle layer in QGis. I don't know if things have improved.***
*
In Java based projects the drivers are generelly better (i.e. Gvsig, Kosmo,
etc.) maybe because it's easier to mantin them rather then the OCI (C/C++)
interface.****
** **
Anyway, the first thing to do is to download the Oracle Client drivers from
Oracle [1]. After having installed it you will find the required libraries
for GDAL to use the driver. I have only experience with Oracle for Windows,
where for Oracle 11g the DLL is oraociei11.dll****
** **
If GDAL find the shared library on the bin path, it will activate the OCI
driver, and that's the end. At this point you can use an Oracle layer
thorugh whatever client using GDAL.****
** **
Giovanni****
** **
[1]
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
****
** **
Lady and Gentlemen,****
** **
Sorry if I'm being intrusive! I got your emails in a thread.****
** **
I am trying to connect to Oracle Spatial with QGIS (Why Kosmo can do it?).
****
** **
I have already sent several emails to Oracle, OSGeo, gdal.org, qgisbrasil.
And I've read various threads of the QGIS forums. But I did not succeed!*
***
****
I know you will say to me: Use GDAL / OGR or OSGeo4W package! I've
installed it!****
** **
And I ask you: And now? How to use?****
** **
I'm not a developer! I am a common GIS user!****
** **
What I need is a cookbook, step-by-step:****
1 - Where to find what I need!****
2 - How to install them!****
3 - How to configure QGIS to use them!****
4 - How to connect Oracle Spatial through QGIS!****
** **
Can anyone help me?****
** **
Sandro Costa****
Brazil****
** **
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-user/attachments/20110929/06db29eb/attachment.html
Duarte Carreira
2011-10-01 00:07:24 UTC
Permalink
The only thing I can add is that when I want to use in QGIS some format that GDAL/OGR supports but there's no GUI for it in QGIS, I create a VRT file. This file can have all the Oracle connection details, can be tested on the command line, and then loaded in QGIS.

Duarte

De: G. Allegri [mailto:***@gmail.com]
Enviada: quinta-feira, 29 de Setembro de 2011 16:37
Para: Sandro Costa
Cc: Duarte Carreira; qgis-***@lists.osgeo.org; ***@arrowgeomatics.com; ***@norbit.de
Assunto: Re: Connect to Oracle Spatial with QGIS

Hi Sandro,
in my experience the GDAL/OGR driver for Oracle (OCI driver) doesn't work very well. It depends on what you need it for, but for example it was a pain vieweing an Oracle layer in QGis. I don't know if things have improved.
In Java based projects the drivers are generelly better (i.e. Gvsig, Kosmo, etc.) maybe because it's easier to mantin them rather then the OCI (C/C++) interface.

Anyway, the first thing to do is to download the Oracle Client drivers from Oracle [1]. After having installed it you will find the required libraries for GDAL to use the driver. I have only experience with Oracle for Windows, where for Oracle 11g the DLL is oraociei11.dll

If GDAL find the shared library on the bin path, it will activate the OCI driver, and that's the end. At this point you can use an Oracle layer thorugh whatever client using GDAL.

Giovanni

[1] http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

2011/9/29 Sandro Costa <***@gmail.com<mailto:***@gmail.com>>
Lady and Gentlemen,

Sorry if I'm being intrusive! I got your emails in a thread.

I am trying to connect to Oracle Spatial with QGIS (Why Kosmo can do it?).

I have already sent several emails to Oracle, OSGeo, gdal.org<http://gdal.org>, qgisbrasil. And I've read various threads of the QGIS forums. But I did not succeed!

I know you will say to me: Use GDAL / OGR or OSGeo4W package! I've installed it!

And I ask you: And now? How to use?

I'm not a developer! I am a common GIS user!

What I need is a cookbook, step-by-step:
1 - Where to find what I need!
2 - How to install them!
3 - How to configure QGIS to use them!
4 - How to connect Oracle Spatial through QGIS!

Can anyone help me?

Sandro Costa
Brazil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-user/attachments/20110929/19d5a18d/attachment-0001.html
G. Allegri
2011-10-07 18:22:38 UTC
Permalink
Good to know Sandro!
It would helpful to have your hints on the Qgis wiki. I could submit it on
the Qgis developers ML

giovanni
Dear friends,
Finally I got it!
*Quantum GIS 1.7.1 with OSGeo4W installer:*
I have the Oracle Client installed on the machine. So, the *path *to the
oci.dll and oraociei11.dll libraries was automatically set.
I installed the package OSGeo4W!
So, on QGIS, in Add Vector Layer tool, appeared the type "Oracle Spatial"
in Base Data!
I has can finally connect to Oracle Spatial with Quantum GIS 1.7.1!
I managed to connect to two databases on two different servers!
I investigated the differences between the standalone and OSGeo4W
installations! The standalone QGIS 1.7.1 not presented the option to connect
to Oracle Spatial!
I did a fresh install of QGIS on a clean machine containing the Oracle
Client 11g R1 (a machine that had never received a QGIS installation or
OSGeo4W!).
So *I copied the ogr_OCI.dll and gdal_GEOR.dll libraries* from the QGIS
installed by OSGeo4W into the folder *\Bin\gdalplugins\1.8* of the
standalone QGIS 1.7.1
I enabled the QGIS complements. So, the QGIS can correctly connect to
Oracle!
I think the developers could insert these libraries in the standalone QGIS
installer and so end this unnecessary trouble!
This procedure is not new! Many people have reported this method! But it
did not work! Maybe this newer version has solved problems.
Regards,
Sandro.
Lady and Gentlemen,
Sorry if I'm being intrusive! I got your emails in a thread.
I am trying to connect to Oracle Spatial with QGIS (Why Kosmo can do it?).
I have already sent several emails to Oracle, OSGeo, gdal.org,
qgisbrasil. And I've read various threads of the QGIS forums. But I did not
succeed!
I know you will say to me: Use GDAL / OGR or OSGeo4W package! I've
installed it!
And I ask you: And now? How to use?
I'm not a developer! I am a common GIS user!
1 - Where to find what I need!
2 - How to install them!
3 - How to configure QGIS to use them!
4 - How to connect Oracle Spatial through QGIS!
Can anyone help me?
Sandro Costa
Brazil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-user/attachments/20111007/3fa7d641/attachment.html
Jürgen E. Fischer
2011-10-07 20:03:37 UTC
Permalink
Hi Sandro,
So I copied the ogr_OCI.dll and gdal_GEOR.dll libraries from the QGIS
installed by OSGeo4W into the folder \Bin\gdalplugins\1.8 of the
standalone QGIS 1.7.1
Which is what the OSGeo4W gdal-oracle package contains. It depends on the
oci package, which is the oracle client.
I think the developers could insert these libraries in the standalone QGIS
installer and so end this unnecessary trouble!
The oci package is 32MB ie. ~130MB installed...


J?rgen
--
J?rgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20
Dipl.-Inf. (FH) Rheinstra?e 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
Registro Softwares
2011-10-08 03:13:25 UTC
Permalink
Hi J?rgen,

Thank you for answering!
Post by Jürgen E. Fischer
Which is what the OSGeo4W gdal-oracle package contains. It depends on the
oci package, which is the oracle client.
As you can read the email I had writen previously to Giovanni about the
OSGeo4W gdal-oracle package:

About the locations of the libraries:
In fact, when we installed only the gdal-oracle library from the OSGeo4W
installer, only the dlls from the \OSGeo4W\bin\gdalplugins\1.8 are
downloaded!
The steps to download are as follows:
OSGeo4W installer> Install Advanced> ... > Select Packages> View (Category).
Categories> Libs
Just select: gdal-oracle: OGR OCI and GDAL GeoRaster Plugins for Oracle.
The actual version is 1.8.0-1
Leave all items unchecked in this and in the other categories!
Post by Jürgen E. Fischer
The oci package is 32MB ie. ~130MB installed...
You are right about the size of the package! But, it is a good idea to
document all these procedures I did! This procedure for connecting to Oracle
had to be explicit in the QGIS documentation!
The ordinary user of GIS does not know about this! So, he will prefer to use
a easier software! Often a commercial software!

Sandro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-user/attachments/20111007/5be12f68/attachment.html
Loading...