[gdal-dev] [EXTERNAL] oci and oracle express 11

Smith, Michael ERDC-RDE-CRREL-NH Michael.Smith at erdc.dren.mil
Wed Apr 9 15:39:43 PDT 2014


Martin,

You need a bit more info in the connection

ogrinfo -ro OCI:user/password at hostname/sid -sql "select count(*) from emp"


Where hostname is the server name (or something like localhost) and sid is
the oracle instance name. if this is XE, then the sid is xe

So try  ogrinfo -ro OCI:user/password at localhost/xe -sql "select count(*)
from emp"

Mike

-- 
Michael Smith

US Army Corps
Remote Sensing GIS/Center



On 4/9/14, 6:31 PM, "Martin Landa" <landa.martin at gmail.com> wrote:

>Hi all,
>
>I would like to set up connection between OGR and Oracle Express 11g,
>I downloaded Oracle SQL Developer and set up the connection, when I
>try to connect to the database using user/password it works.
>
>When using OGR I entered to command line
>
>ogrinfo -ro OCI:user/password -sql "select count(*) from emp"
>
>but it failed with
>
>ERROR 1: ORA-12560: TNS:protocol adapter error
> in <unnamed>
>
>Thanks in advance for any pointers! Martin
>
>-- 
>Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
>_______________________________________________
>gdal-dev mailing list
>gdal-dev at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list