[MS4W-Users] Oracle - Unable to open datasource

Simon Mercier smercier at mapgears.com
Thu May 31 11:24:43 EST 2012


Many, many thank's jeff, mike and michael :-) So I finaly find something
and it's so stupid!  All is about OS type Instantclient vs ms4w...  I try
and I try since 3 days with 64bits Oracle client instead of 32bits :-(   My
VMWare server is a 64-bit OS but ms4w only supported in 32bit!  SHAME ON ME
Silverfox ...

http://osgeo-org.1560.n6.nabble.com/MS4W-Users-OS-support-td4263646.html

But hey, I find Mike tips very useful for this one...

set CPL_DEBUG=on

cheers and have a nice w-e



2012/5/30 Smith, Michael ERDC-CRREL-NH <Michael.Smith at usace.army.mil>

> Jeff,
>
> I tested out ms4w with the 11gR2 Instant Client (it was the full client
> installer and I just installed the instant client). I had no problems
> accessing and oracle database.
>
> Note that I did not use a TNS connection. I used the Oracle EZConnect
> syntax, which is username/password at servername:port/service_name. Note that
> the port can be dropped if it is the default 1521. I moved the ogr_OCI.dll
> file to the C:\ms4w\gdalplugins directory. Then verified that the Oracle
> client was on the path.
>
> ----
> Test run
>
>
> C:\ms4w>set
> Path=C:\app\Administrator\product\11.2.0\client_1;C:\WINDOWS\system32;C:\WI
> NDOWS
> ...
>
> C:\ms4w>setenv.bat
> GDAL, mapserv, mapcache, PROJ, and shapelib dll
> GDAL_DATA path set
> GDAL_DRIVER_PATH set
> PROJ_LIB set
> CURL_CA_BUNDLE set
> C:\ms4w>ogrinfo --formats
> Supported Formats:
>  -> "OCI" (read/write)
>  -> "ESRI Shapefile" (read/write)
>  ...
>
>   -> "SEGY" (readonly)
>
> C:\ms4w>ogrinfo
> oci:myuser/mypass at dbname.army.mil/servicename.army.mil:esri.states
> INFO: Open of
> `oci:myuser/mypass at dbname.army.mil/servicename.army.mil:esri.states'
>      using driver `OCI' successful.
> 1: esri.states
>
> C:\ms4w>set CPL_DEBUG=on
>
> C:\ms4w>ogrinfo
> oci:myuser/mypass at dbname.army.mil/servicename.army.mil:esri.states
> OGR: Auto register \ms4w\gdalplugins\ogr_OCI.dll using RegisterOGROCI.
> OCI: Userid=myuser, Password=mypass,
> Database=dbname.army.mil/servicename.army.mil
> OCI: Prepare(ALTER SESSION SET NLS_DATE_FORMAT='YYYY/MM/DD'
> NLS_TIME_FORMAT='HH24:MI:SS' NLS_TIME_TZ_FORMAT='HH2
> 4:MI:SS TZHTZM'         NLS_TIMESTAMP_FORMAT='YYYY/MM/DD HH24:MI:SS'
>  NLS_TIMESTAMP_TZ_FORMAT='YYYY/MM/DD HH24:MI
> :SS TZHTZM')
> OCI: Prepare(SELECT COUNT(*) FROM ALL_SDO_GEOM_METADATA u,
> TABLE(u.diminfo) t  WHERE u.table_name = 'states' AND u.colu
> mn_name = 'SHAPE')
> OCI: get dim based of existing data or index failed.
> OCI: Prepare(SELECT SRID FROM ALL_SDO_GEOM_METADATA WHERE TABLE_NAME =
> UPPER('states') AND COLUMN_NAME = UPPER('SHAPE')
> AND OWNER = 'esri')
> OGR:
> OGROpen(oci:myuser/
> mypass at dbname.army.mil/servicename.army.mil:esri.states/
> 022F38D8) succeeded as OCI.
>
> INFO: Open of
> `oci:myuser/mypass at dbname.army.mil/servicename.army.mil:esri.states'
>      using driver `OCI' successful.
>
> --
> Michael Smith
>
> US Army Corps
> Remote Sensing GIS/Center
>
>
>
>
>
> On 5/30/12 4:18 PM, "Jeff McKenna" <jmckenna at gatewaygeomatics.com> wrote:
>
> >With Mike's debug trick I do see more info when I pass a bad SID to
> >OGR/GDAL:
> >
> >ogrinfo OCI:jeff/marvin at geo2
> >  OGR: Auto register \ms4w\gdalplugins\ogr_OCI.dll using RegisterOGROCI.
> >  OCI: Userid=jeff, Password=marvin, Database=geo2
> >  ERROR 1: ORA-12154: TNS:could not resolve the connect identifier
> >specified
> >   in <unnamed>
> >  OCI: Userid=jeff, Password=marvin, Database=geo2
> >  ERROR 1: ORA-12154: TNS:could not resolve the connect identifier
> >specified
> >   in <unnamed>
> >  FAILURE:
> >  Unable to open datasource `OCI:jeff/marvin at geo2' with the following
> >drivers.
> >    -> OCI
> >    -> ESRI Shapefile
> >    -> MapInfo File
> >    -> UK .NTF
> >
> >-jeff
> >
> >
> >
> >
> >--
> >Jeff McKenna
> >MapServer Consulting and Training Services
> >http://www.gatewaygeomatics.com/
> >
> >
> >_______________________________________________
> >MS4W-Users mailing list
> >MS4W-Users at lists.maptools.org
> >http://lists.maptools.org/mailman/listinfo/ms4w-users
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users
>



-- 
Simon Mercier
Co-Fondateur et Vice-Président chez Solutions Mapgears
2383 chemin Ste-Foy, bureau 202, Québec, QC
Canada G1V 1T1

Tel _ 418.559.7139
web _ mapgears.com
blog _ http://simonmercier.net/blog
linkedIn _ http://ca.linkedin.com/in/simonmercier
twitter _ http://twitter.com/simonmercier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20120531/65ab0bff/attachment-0001.htm 


More information about the MS4W-Users mailing list