[mapserver-users] Connecting MSSQL from Mapserver on Linux fails

Tamas Szekeres szekerest at gmail.com
Fri Jan 17 00:35:28 PST 2014


I think you should specify the ODBC driver name in the connection string
(driver=[driver name]). I've never tested the connection on linux, though.

Best regards,

Tamas




2014/1/17 Jon Garrido <jgarrido at tracom.info>

> Helo,
>
>
>
> I’m trying to connect to a MS Sql Server 2008 dabase from a Mapserver
> installed on a Ubuntu 12.04 machine.
>
>
>
> The fact is that when make de same connection test from another Mapserver
> on Windows I get no errors:
>
>
>
> From the OSGeo4W Shell from windows I type:
>
>
>
> C:>ogrinfo
> "MSSQL:server=Xxx.xxx.xx.xx,1093\MSSQL;uid=xxxxx;pwd=xxxxx;database=ancashesp;tables=admin.PKGeoLoc"
>
>
>
> And the response:
>
>
>
> INFO: Open of
> `MSSQL:server=209.236.114.58,1093\MSSQL;uid=ancashjon;pwd=xxxxx;database=ancashesp;tables=admin.PKGeoLoc'
> using driver `MSSQLSpatial' successful.
>
> 1: PKGeoLoc
>
>
>
> When I do the same from my linux terminal the response is:
>
>
>
> ERROR 1: Unable to initialize connection to the server for
> MSSQL:server=xxx.xx.
> xx.x,1093\MSSQL;uid=xxxxx;pwd=xxxxx;database=ancashesp;tables=admin.PKGeoLoc,
>
> [unixODBC][Driver Manager]Data source name not found, and no default
> driver specified
>
> ERROR 1: Unable to initialize connection to the server for
> MSSQL:server=xxx.xxx.xx,1093\MSSQL;uid=xxxxx;pwd=xxxxxx;database=ancashesp;tables=admin.PKGeoLoc,
>
> [unixODBC][Driver Manager]Data source name not found, and no default
> driver specified
>
> FAILURE:
>
> Unable to open datasource
> `MSSQL:server=xxx.xxx.xxx.xx,1093\MSSQL;uid=xxxx;
> pwd=xxxxx;database=ancashesp;tables=admin.PKGeoLoc' with the following
> drivers.
>
>   -> ESRI Shapefile
>
>   -> MapInfo File
>
>   -> UK .NTF
>
>   -> SDTS
>
>   -> TIGER
>
>   -> S57
>
>   -> DGN
>
>   -> VRT
>
>   -> REC
>
>   -> Memory
>
>   -> BNA
>
>   -> CSV
>
>   -> NAS
>
>   -> GML
>
>   -> GPX
>
>   -> KML
>
>   -> GeoJSON
>
>   -> Interlis 1
>
>   -> Interlis 2
>
>   -> GMT
>
>   -> SQLite
>
>   -> ODBC
>
>   -> PGeo
>
>   -> MSSQLSpatial
>
>   -> PostgreSQL
>
>   -> PCIDSK
>
>   -> XPlane
>
>   -> AVCBin
>
>   -> AVCE00
>
>   -> DXF
>
>   -> Geoconcept
>
>   -> GeoRSS
>
>   -> GPSTrackMaker
>
>   -> VFK
>
>   -> PGDump
>
>   -> OSM
>
>   -> GPSBabel
>
>   -> SUA
>
>   -> OpenAir
>
>   -> PDS
>
>   -> WFS
>
>   -> HTF
>
>   -> AeronavFAA
>
>   -> Geomedia
>
>   -> EDIGEO
>
>   -> GFT
>
>   -> SVG
>
>   -> CouchDB
>
>   -> Idrisi
>
>   -> ARCGEN
>
>   -> SEGUKOOA
>
>   -> SEGY
>
>   -> ODS
>
>   -> XLSX
>
>   -> ElasticSearch
>
>   -> PDF
>
>
>
>
>
> My gdal verion is GDAL 1.10.1, released 2013/08/26.
>
>
>
> Please I’m getting crazy!!! Any idea??
>
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140117/1e1aa4c7/attachment.htm>


More information about the MapServer-users mailing list