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.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI'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.
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.