Microsoft SQL Server Spatial (built natively into Microsoft SQL Server for Windows, Linux, and Docker containers, as well as Azure SQL) is an enterprise relational spatial database engine supporting planar `geometry` and ellipsoidal `geography` data types. Widely used by government agencies, utilities, telecommunications, logistics platforms, and enterprise IT teams standardized on Microsoft stacks, SQL Server Spatial allows developers and GIS analysts to store, index, query, and visualize 2D/3D vector features using standard `T-SQL` alongside direct connectivity to `QGIS`, `Esri ArcGIS Pro`, `Bentley OpenCities Map`, `Safe Software FME`, and `GDAL/OGR`.
1. In-Depth Review: Why Enterprise & Windows/Azure Teams Use SQL Server Spatial
- Built Natively Into Every SQL Server Edition (Including Free Express & Developer): Requires no external spatial plug-ins or separate spatial licenses—`geometry` and `geography` data types, `OGC` methods, and spatial indexes work out of the box across SQL Server Express, Developer, Standard, Enterprise, and Azure SQL.
- Dual Planar (`geometry`) & Geodetic (`geography`) Spatial Models: Stores projected CAD/survey coordinates (`geometry`) as well as round-earth latitude/longitude coordinates (`geography`) with ellipsoidal area and distance calculations.
- Visual Spatial Preview Inside `SQL Server Management Studio (SSMS)` + Full GIS Client Support: Renders spatial query results directly on a map tab inside `SSMS` while supporting multi-user editing in `Esri ArcGIS Pro`, `QGIS`, and `Bentley OpenCities Map`.

2. Key Features & Capabilities
- Native `geometry` & `geography` Data Types (`OGC` & `ISO` Compliant): Store points, linestrings, polygons, circular arcs, compound curves, and geometry collections with full `WKT`, `WKB`, and `GML` support.
- Multi-Level Grid & Auto-Grid Spatial Indexing: Accelerate `STIntersects`, `STContains`, `STDistance`, `STBuffer`, `STUnion`, and nearest-neighbor queries across millions of spatial rows.
- Built-In Map Visualization in `SSMS` (`Spatial results` Tab): Inspect query geometries immediately inside SQL Server Management Studio without exporting to external desktop GIS tools first.
- Seamless Integration with `ArcGIS Pro`, `QGIS`, `FME`, `GDAL` & `.NET` / `Entity Framework`: Connect enterprise GIS clients, ETL pipelines, and custom web APIs directly to spatial tables and views.
- Cross-Platform Deployment (`Windows`, `Linux`, `Docker`, `Azure SQL`): Run SQL Server Spatial on Windows Server, Ubuntu/RHEL Linux, Docker containers, or managed Azure SQL cloud databases.
- 100% Free `SQL Server Express` & `SQL Server Developer` Editions: Free to download and use for development, learning, testing, and lightweight production workloads.
- Official Links: Free Download, SSMS & Documentation
Always download Microsoft SQL Server, SQL Server Management Studio (`SSMS`), and documentation directly from official Microsoft portals:
- Official Microsoft SQL Server Downloads (Free Express & Developer Editions): https://www.microsoft.com/en-us/sql-server/sql-server-downloads
- Official SQL Server Spatial Data Types Overview & Documentation: https://learn.microsoft.com/en-us/sql/relational-databases/spatial/spatial-data-sql-server
- Official SQL Server Management Studio (SSMS) Download Portal: https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
4. Step-by-Step Installation Guide
- Check Operating System & Hardware Requirements: Confirm your workstation or server runs 64-bit `Windows 10/11`, `Windows Server`, or `Linux` / `Docker` with at least 4 GB RAM (16 GB–32 GB+ recommended for production spatial workloads) and 10 GB+ free SSD space.
- Download `SQL Server Express` or `Developer` + `SSMS`: Visit https://www.microsoft.com/en-us/sql-server/sql-server-downloads to download the free SQL Server installer, and download `SQL Server Management Studio (SSMS)` from Microsoft Learn.
- Run the SQL Server Installation Wizard: Launch the SQL Server installer (`Basic` or `Custom`), accept the license terms, choose your installation directory, and complete database engine setup.
- Install `SSMS` & Connect to Your Database Instance: Run the `SSMS` installer, open `SQL Server Management Studio`, connect to `localhost` (or `localhost\SQLEXPRESS`), and verify spatial functions work (`SELECT geometry::Point(102.6, 17.97, 4326);`).
<Image src="image_agent_tag_7831190466098525973" alt="SQL Server Installation Center setup wizard screen" caption="SQL Server Installation Center setup wizard" />
5. How to Use Microsoft SQL Server Spatial: Beginner Workflow
- Create a Spatial Table in `SSMS`: Open a `New Query` window in `SQL Server Management Studio` and execute `CREATE TABLE gis_parcels (id INT IDENTITY PRIMARY KEY, parcel_code NVARCHAR(50), geom GEOMETRY);`.
- Insert Spatial Features Using `STGeomFromText`: Insert polygon or point features with an `EPSG` SRID—for example `INSERT INTO gis_parcels (parcel_code, geom) VALUES ('P-001', geometry::STGeomFromText('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 32648));`.
- Create a Spatial Index for Fast Queries: Run `CREATE SPATIAL INDEX sidx_gis_parcels ON gis_parcels(geom);` so bounding-box and intersection queries run rapidly.
- Query & Preview on the `Spatial results` Tab in `SSMS`: Execute `SELECT id, parcel_code, geom, geom.STArea() AS area_sqm FROM gis_parcels;` and click the `Spatial results` tab next to `Results` to view the shapes visually.
- Connect `QGIS` or `ArcGIS Pro` to Edit Live Layers: Open `QGIS > Data Source Manager > MSSQL` (or `ArcGIS Pro > New Database Connection`), enter your SQL Server host and database name, and load your spatial tables onto the map.
6. Frequently Asked Questions (FAQ)
- What is the difference between `geometry` and `geography` in SQL Server Spatial?`geometry` uses planar (flat-earth / projected coordinate system) math ideal for local engineering/UTM projections, while `geography` uses ellipsoidal (round-earth latitude/longitude) math for global distances and areas.
- Is Microsoft SQL Server Spatial free to use?Yes. Spatial capabilities are included at no extra cost in `SQL Server Express` (free for small production/desktop use up to 10 GB per database) and `SQL Server Developer` (free full-featured edition for development and testing).
- Can QGIS and ArcGIS Pro read and write Microsoft SQL Server Spatial tables?Yes. Both `QGIS` and `Esri ArcGIS Pro` include native MSSQL spatial database providers for viewing, querying, and editing features.