On this website, you can find many ways to install Microsoft SQL Server on different platforms such as Ubuntu, Debian, and so on. But today, I will show you how to export shapefiles to the spatial database in SQL Server. Microsoft SQL Server comes with built-in spatial data support which means we can store our spatial dataset in the database server. In this article, we are going to show you the ways to export Shapefiles (*.shp) into the SQL Server.
There are many ways to export Shapefiles to SQL Server. You can use free tools such as ogr2ogr but it takes a lot of effort and is not suitable for beginners. But don’t worry, we still have some free solutions for this below. To be able to export spatial data to the SQL Server, you will need the following information in hand:
- SQL Server address (or IP address)
- Database name
QGIS is one of the most popular free and open-source GIS and mapping software. It supports Windows, macOS, and also Linux. QGIS has built-in capability to export spatial files into the MS SQL Server. It’s pretty straightforward. To export shapefiles to SQL Server using QGIS, you can follow these steps below
- Open your shapefiles in the QGIS canvas
- Open Export to SQL Server (New Connection) tool from the Toolbox
- On the Export window, specify the Input layer, output geometry layer, table name, server address, database name, username, and password.
- Click Run to start the process
ArcGIS Pro is the most advanced GIS and Mapping software for Windows. It has so many features that we can use to create beautiful and informative maps. ArcGIS Pro supports MS SQL Server very well. It comes with built-in support for SQL Server. To export shapefiles to SQL Server, you can follow the steps below.
Before we can export the shapefiles, we need to create a new connection to the database. Please follow the guide below to connect ArcGIS Pro to the SQL Server
Next, open the shapefiles and we can now export them to our SQL Server
Please note that once we exported our spatial data to SQL Server we won’t be able to edit the feature class. To edit, we will need a special license. I will not discuss that here.
Global Mapper is one of the best GIS software for Windows. This program supports almost any kind of spatial file format. It also supports cloud storage, SQL Server, and many other databases.
First, we need to create a new database connection. The following video will show you how to create a new spatial database connection on Global Mapper. We can connect to various database such as PostGIS, SQL Server, Oracle, and many more.
Next, open the Shapefiles that we are going to export.
It’s pretty easy, right? Thanks for reading this article and we will see you on the next tutorials.