How can I Get Shapefiles from Connected Database?

1670
3
05-23-2019 01:43 PM
StoneAlexander
New Contributor

I am currently interning for a company who uses their own software, but have me on, checking what they could use ArcMap for instead of programming for themselves. Today's issues is they wanted to see if they could connect to their database (SQL) and pull shapefiles from there instead of having to pull them from GeoTransfer. I'm am super new to implementing databases, but I connected one through the catalog, and now can not seem to find a way to actually pull data from them. What do I do? 

3 Replies
Jason_RobinsonRobinson
Esri Regular Contributor

Hi Stone,

Just in case you have not already looked at the help the below link details connecting to SQL Server with a database connections in ArcMap.

https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/connect-sqlserver.htm

My experience is this is simply tabular data tables that one can see when going to Add Data and if this table is a saved map document that each time it is re-opened it should refresh the table for any changes.  And with tabular data most of what I see is address data so then geocoding would be the next step.  Would probably need more detail on data you are pulling over.

Regards,
Jason R.

BillWang1
Esri Contributor

Hi Stone Alexander‌,

From your description, I would assume that you are using a SQL Server database that doesn't have Geodatabase components installed. I do have a question about your shapefiles. Usually, when we say shapefile, we are talking about file-based data storage format. Which is different from what we have in a SQL Server. In SQL Server, we could have a database table that contains a Shape column and eventually drawn by GIS software as a map.

At this point, it seems you are able to see something in the SQL Server connection from Catalog. I'm wondering what did you see? Or are you also looking for a method to upload the shapefile into the SQL Server? We could better help if you can share more information on what you have right now.

Best,

Bill

SusanZwillinger
Occasional Contributor

Hi Stone,

If your SQL data has a spatial data type (Geometry or Geography), sometimes a simple drag and drop from the Catalog to the map view will be enough to display the data in ArcMap.  From there, you can right-click on the map layer in the Table of Contents and use the Data-->Export Data option to create a shapefile or a file geodatabase feature class.  This export takes the data out of SQL and puts it into a file based Esri format as Bill mentioned.  However, if all you need to do is display points on a map from the SQL table, then I would probably leave the data in the SQL format since the data could change.  Obviously, once you export the data, you lose the live connection to the data and it might become out of date.  On the other hand, exporting the data to a shapefile or a feature class may improve your spatial analysis capabilities and performance.

Regards,

-Susan-