Charles, We haven't tried ourself, but someone posted on our OGR2OGR tip page his experience and some gotchas and how to work around them.
http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet If you are not against shelling out some money. One of our clients uses Safe FME for ETL. http://www.safe.com/ It does both PostGIS and SQL Server. I'm not much of a GUI liker for loading so I personally haven't used it myself, but it does seem to have a SQL Server SSIS feel to it If you are into that kind of stuff. Regina and Leo, http://www.postgis.us -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Richard Greenwood Sent: Thursday, June 30, 2011 7:29 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] OT: Export/copy postgres geometry to sql server with bcp I'd suggest that you try ogr2ogr. Rich On Tue, Jun 28, 2011 at 6:48 AM, Charles Galpin <[email protected]> wrote: > Sorry for the somewhat off topic question, but I figured someone here has probably dealt with this. I am using postgis and am very happy with it, but for various reasons I need to export some of our data to sql server periodically and want to automate it, preferably to fit into our existing framework which uses bcp to import from flat files. However looking at the binary output of a straight "copy" to CSV the binary formats do not look the same. Is there any way to export to a format that bcp can understand? > > I can export the wkt, strip quotes, import into a temp table and then use an insert select to fill the destination table converting the wkt back to a geometry but this is less than ideal. > > tia, > charles > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Richard Greenwood [email protected] www.greenwoodmap.com _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
