[gdal-dev] [EXTERNAL] oci and oracle express 11
Martin Landa
landa.martin at gmail.com
Thu Apr 10 12:39:50 PDT 2014
Hi all,
2014-04-10 12:06 GMT+02:00 Jukka Rahkonen <jukka.rahkonen at mmmtike.fi>:
>> ERROR 1: ORA-12154: TNS:could not resolve the connect identifier specified
>> in <unnamed>
>
> What we have is
> - environment set as TNS_ADMIN=path/to/directory
> - tnsnames.ora file in the TNS_ADMIN directory
> - entry in tnsnames.ora as described in http://orafaq.com/wiki/Tnsnames.ora
> - GDAL connection as OCI:<user>/<passwd> <at> entry_made_above
I have tried to follow these instructions, unfortunately there is
still something missing...
C:\OSGeo4W_oci>echo %TNS_ADMIN%
C:\oraclexe\app\oracle\product\11.2.0\server\hs\admin\tnsnames.ora
The file contains:
XE =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=xe))
(HS=OK)
)
set CPL_DEBUG=ON
C:\OSGeo4W_oci>ogrinfo -ro OCI:user/passwd at 127.0.0.1:1521/xe -sql "select cou
nt(*) from emp"
OGR: Auto register C:\OSGeo4W_oci\\bin\gdalplugins\ogr_OCI.dll using RegisterOGR
OCI.
OCI: Userid=user, Password=passwd, Database=127.0.0.1:1521/xe
ERROR 1: ORA-12154: TNS:could not resolve the connect identifier specified
in <unnamed>
I have tried various variations like
OCI:user/passwd at geo1:1521/xe
OCI:user/passwd at localhost:1521/xe
OCI:user/passwd at xe
but still with no success. Any idea what I am doing wrong?
I I try to connect using sqldeveloper, it's using
xe_landa user@//localhost:1521/xe
so I tried also
OCI:user/passwd@//localhost:1521/xe
but it also failed... Thanks in advance! Martin
--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
More information about the gdal-dev
mailing list