I'm new to ArcGIS and I want to know if I can store data from a layer to a SQL Server table and if we can do this, then how?

I have already made a connection between ArcGIS and SQL Server.


To directly answer your question, yes, you can store spatial data (geometries) in SQL Server. This Microsoft Developer Network link should provide you with everything you need to know about storing spatial data in SQL Server. If you are using ArcGIS 10.1 you already have everything you need, if you're using an older version of ArcGIS you may need to also install ArcSDE.

  • now that I know It's possible to store spatial data in sql server from arcgis.. my probleme is how !!? In other words how to make a sqlServer table as a layer in ArcGIS ? or any solution like this ? – yassin May 31 '13 at 17:08
  • This link (resources.arcgis.com/en/help/main/10.1/index.html#//…) will show you how to set up a geodatabase in SQL Server which you can then access using ArcGIS. – Radar May 31 '13 at 17:23
  • 1
    @yassin complement or add to your question by choosing the edit at the bottom. – Brad Nesom May 31 '13 at 18:34
  • I made a connection to sqlserver and I create a tble into sqlserver database.. now when I want to start editing in the editing tool .. It gives me this warning Event layers that are based on tables without ObjectID fields cannot be edited in ArcGIS. Solution: Export the event layer to a new feature class or use an editable table for the data source of the event layer. what should I do? or what I did wrong ? – yassin May 31 '13 at 23:19
  • If you want to start creating and editing geometries, you will want to start by creating a new features in ArcGIS inside of your new geodatabase, not a table in SQL Server. You can create new features inside of your geodatabase using ArcCatalog. – Radar Jul 2 '13 at 17:29

It depends on what you want to do with that table once you've created it.

If you want to store ArcGIS-only data for ArcGIS-only clients, then you can (as suggested above) use SDE or the 'create enterprise geodatabase tool' to enable ArcGIS to store geodatabase feature classes in SQL Server.

If you want to store data in the native SQL server format for use in SQL queries by SQL users and use the SQL spatial functions through SQL server management studio (SSMS), you should create them differently - by "importing" data into SQL server through ArcCatalog, and use (as suggested above) the "geography" or "geometry" keyword. This will store the data as native SQL server spatial data, and enable users beyond ArcGIS to access the spatial data. (you can also create them in SSMS and populate them using SQL copy functions...)


You can create a geodatabase in SQL server, then simply import your data using Catalog. Or you can add your data as a spatial table in SQL, using the GEOMETRY or GEOGRAPHY keyword as appropriate. If you create a table outside of a geodatabase then you will need to ensure that you have a unique ID column to edit it with Arc. Arc creates this automatically in a geodatabase and manages it itself.

  • I'm not sure that a uniqueID will enable editing of sql server spatial data with ArcGIS. we're going through this right now and its a big limitation of ArcGIS! – DPSSpatial Jul 2 '13 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.