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

Peter Halls p.halls at york.ac.uk
Wed Apr 9 23:56:21 PDT 2014


Martin,

      when working with Oracle, it is always worth looking up an ORA
message number at Oracle: you will find a full explanation and suggestions
for resolution.

      For your error, look up http://ora-12154.ora-code.com/

      In summary, the error means that the Oracle client is unable to find
/ connect to the Oracle service name specified in the Oracle connection
string.  In the past, this meant that the service name specified could not
be found in the file tnsnames.ora - there are some alternative ways of
specifying Oracle services now, so please do look up the web page mentioned
above.

Best wishes,

Peter


On 10 April 2014 02:27, Smith, Michael ERDC-RDE-CRREL-NH <
Michael.Smith at erdc.dren.mil> wrote:

> If <user>/<passwd>@xe works in sqlplus, you can use that in OGR. Its using
> the same libs to connect.
>
> Try ogrinfo -ro OCI:<user>/<passwd>@xe
>
> Mike
>
> On 4/9/14, 8:01 PM, "Martin Landa" <landa.martin at gmail.com> wrote:
>
> >Hi,
> >
> >2014-04-10 1:40 GMT+02:00 Smith, Michael ERDC-RDE-CRREL-NH
> ><Michael.Smith at erdc.dren.mil>:
> >> Hmm, this one should have work
> >>
> >> ogrinfo -ro OCI:user/password at geo1:1521/xe -sql "select count(*) from
> >>emp"
> >>
> >>
> >> You can use debug mode and see what might be going on. This is windows I
> >> see so try
> >>
> >> SET CPL_DEBUG=ON
> >> ogrinfo -ro OCI:user/password at geo1:1521/xe -sql "select count(*) from
> >>emp"
> >
> >unfortunately there is not so much info...
> >
> >OGR: Auto register C:\OSGeo4W_oci\\bin\gdalplugins\ogr_OCI.dll using
> >RegisterOGR
> >OCI.
> >OCI: Userid=<user>, Password=<passwd>, Database=geo1:1521/xe
> >ERROR 1: ORA-12154: TNS:could not resolve the connect identifier specified
> > in <unnamed>
> >
> >> Does sqlplus connect and allow access?
> >
> >This works...
> >
> >SQL> connect <user>/<passwd>@xe
> >Connected.
> >
> >Martin
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
----------------------------------------------------------------------------------------------------------------
Peter J Halls, PhD Student, Post-war Reconstruction and Development Unit
(PRDU)
                     Department of Politics, University of York

Snail mail: PRDU, Derwent College, University of York,
                Heslington, York YO10 5DD
This message has the status of a private and personal communication
----------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140410/35ef5b3b/attachment.html>


More information about the gdal-dev mailing list