Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 967449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:19:06+00:00 2026-05-16T02:19:06+00:00

(ANSWER) How to export some Geography data from a Microsoft Sql Server 2008. You’ll

  • 0

(ANSWER) How to export some Geography data from a Microsoft Sql Server 2008.

You’ll need to use the command line argument BCP to dump the data in it’s original (native) format to a binary file. Then on the other server you can bulk insert this binary data back into a table of the same strucutre.

here’s some code.

Export

Command Line: bcp "geodata.dbo.GeographyData" out "C:\GeoData.bin" -T -n -S <servername>

Notes

  • This uses a Trusted connection
  • use the bcp /? for more help for your export options if u need to be hardcore.

Importing the data

T-SQL: bulk insert GeographyData from 'C:\GeoData.bin' with (dataFileType='Native')

I learnt all this through the Spatial guru Isaac Kunen and with the help of Kent Tegels, in this discussion thread here.

The reason for the BCP method is highlighted by Isaac in this quote:

Its worth pointing out that WKB is a
lossy format, in that it does not
store the SRID. So if you extract and
insert the WKB, you’ll have to carry
the SRID yourself. Our internal
binary format does store the SRID, so
a BCP like this should be less hassle.

HTH.

EDIT: Replaced entire post question as a community wiki .. this this Post being an answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:19:07+00:00Added an answer on May 16, 2026 at 2:19 am

    I originally removed the question in the opening post, to replace it with the answer (at the end of ’08) … and make it a wiki.

    So yeah .. the OP is the answer 😛

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to export some data from my jruby on rails webapp to excel,
I found this answer using xp_cmdshell SQL Server Agent Job - Export results to
I'd like to run MyRunnableJar.jar from command line. It will need to read from
I'm using the Import/Export Wizard to import some data to a table. Total of
We have manage to export data from our mysql table into a .txt file.
I want to export my big SSMS (SQL Server Management Studio) query result (2.5m
I recently asked about accessing data from SPSS and got some absolutely wonderful help
I need to export both simple geometry and a vector field to some VTK
I'm working in R, but I need to deliver some data in SPSS format
My Use Case: I want to import the large data from EC2 through SQOOP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.