[gdal-dev] Oracle spatial with gdal

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Oracle spatial with gdal

san619
I tried to connect to oracle database using gdal.But im getting an error
ERROR 1: Unable to find driver `oci'.
I have oracle instant client in my machine and i have the oracle_home path
set but im unable to connect.I have checked the drivers list in gdal
sdkshell.I found several databases like postgresql,mssql and many.But i
didnt found oracle driver.How can i install the oracle driver in my gdal.How
can i configure and install oracle driver in my GDAL.Please help me with
this.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

jmckenna
Administrator
If you are on Windows, you can follow these steps to enable Oracle
connections through GDAL:
https://ms4w.com/README_INSTALL.html#steps-to-enable-oracle-10g-or-11g-or-12c-support-in-ms4w

-jeff



On 2019-01-31 1:48 AM, san619 wrote:

> I tried to connect to oracle database using gdal.But im getting an error
> ERROR 1: Unable to find driver `oci'.
> I have oracle instant client in my machine and i have the oracle_home path
> set but im unable to connect.I have checked the drivers list in gdal
> sdkshell.I found several databases like postgresql,mssql and many.But i
> didnt found oracle driver.How can i install the oracle driver in my gdal.How
> can i configure and install oracle driver in my GDAL.Please help me with
> this.
>
>

--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

Jürgen E. Fischer
In reply to this post by san619
Hi,

On Wed, 30. Jan 2019 at 22:48:26 -0700, san619 wrote:
> I tried to connect to oracle database using gdal.But im getting an error
> ERROR 1: Unable to find driver `oci'.

You're probably missing the oci plugin.

You can install gdal-oracle from osgeo4w[0] - it'll also fetch the instant
client (both are also included in the QGIS standalone installer).


Jürgen

[0] http://osgeo4w.osgeo.org

--
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden              https://www.norbit.de

norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

signature.asc (844 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

san619
Thanks for the reply Jürgen E. Fischer.I got the driver working now.But when
im trying to connect to the oracle im getting error "ERROR 1: ORA-12170:
TNS:Connect timeout occurred"
What could be the reason.I have installed oracle instant client and set the
oracle path also.But im unable to connect why? Im using the query "ogrinfo
OCI:user/password@server/service_name" in the gdal sdk shell
but im getting error. i tried other way also"ogrinfo -ro
OCI:user/password@server/service_name" but still the same error what could
be the reason.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

san619
In reply to this post by jmckenna
Thanks for the reply jmckenna.I got the driver working now.But when im trying
to connect to the oracle im getting error "ERROR 1: ORA-12170: TNS:Connect
timeout occurred"
What could be the reason.I have installed oracle instant client and set the
oracle path also.But im unable to connect why? Im using the query "ogrinfo
OCI:<user>/<password>@<server>/<service_name>" in the gdal sdk shell
but im getting error. i tried other way also
"ogrinfo -ro OCI:<user>/<password>@<server>/<service_name>" but still the
same error what could be the reason.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

Thomas Knudsen
try user:password instead of user/password.

(Also, you *may* need a port number, server:port/service_name)


Den fre. 1. feb. 2019 kl. 13.56 skrev san619 <[hidden email]>:
Thanks for the reply jmckenna.I got the driver working now.But when im trying
to connect to the oracle im getting error "ERROR 1: ORA-12170: TNS:Connect
timeout occurred"
What could be the reason.I have installed oracle instant client and set the
oracle path also.But im unable to connect why? Im using the query "ogrinfo
OCI:<user>/<password>@<server>/<service_name>" in the gdal sdk shell
but im getting error. i tried other way also
"ogrinfo -ro OCI:<user>/<password>@<server>/<service_name>" but still the
same error what could be the reason.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Oracle spatial with gdal

jratike80
Thomas Knudsen wrote
> try user:password instead of user/password.
>
> (Also, you *may* need a port number, server:port/service_name)

Hi,

No need to try user:password, it won't work. Just use user/password as
documented in https://gdal.org/drv_oci.html.

What I have always used for making a connection with Oracle is to use the
service name that is defined in my tnsnames.ora file
http://orafaq.com/wiki/Tnsnames.ora. For example

ogrinfo OCI:user/password@ORA12

-Jukka Rahkonen-



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev