Questions tagged [sql-server]

Microsoft SQL Server is a relational database server product by Microsoft. Its primary query languages are T-SQL and ANSI SQL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

SRID in ST_Geometry fails to update with ‘Define Projection’ but Esri feature class CRS does update

I need to re-define (not reproject) a CRS for a feature class in an enterprise geodatabase (SQL Server). When I use the 'Define Projection' in AGS Pro (2.9.5), the CRS shown in Esri states the proper ...
Rex's user avatar
  • 576
0 votes
0 answers
15 views

Loading data from SQL Server in QGIS not working [closed]

I loaded SQL server table to the QGIS, but this message came up: GEOM is invalid layer and can not be loaded
Fardad Farhadi -City of Kwinan's user avatar
0 votes
0 answers
24 views

Convert WKT varchar(max) representation in SQL Server to geometry in QGIS

I have a varchar(max) column in a SQL Server table that contains WKT that I want to display in QGIS. I can't change the database, so can this be rendered as polygons in QGIS? I have seen this thread ...
Feargal Hogan's user avatar
0 votes
0 answers
32 views

Moving tables with spatial data from SQL Server to PostGIS

I need to move tables with spatial data from SQL Server running on a server to PostGIS on another server daily. My current method is using geopandas to read the tables then writing the tables to ...
Sam's user avatar
  • 11
1 vote
0 answers
38 views

Slow rendering after switching from Geopackage to SQL Server Spatial [closed]

I have a table of 13500 points, all in OSGB 27700, which was in a GeoPackage. My QGIS 3.28.1 project displayed and stylised these very quickly when panning and zooming (almost instant). I have to ...
ChrisBB's user avatar
  • 11
0 votes
0 answers
61 views

ogr2ogr MSSQL to geopackage encoding

I'm exporting data from a MSSQL server to geopackage. "C:\OSGeo4W\bin\ogr2ogr.exe" -f "GPKG" "C:\folder\tables.gpkg" "MSSQL:server=theserver;database=thedb;driver=...
BERA's user avatar
  • 71.2k
2 votes
0 answers
37 views

How do I find the length of part of a line segment that crosses a polygon boundary?

I have a street centerline table and a borough boundary polygon table. I want to select any centerlines that cross borough boundaries and also return the how much of that centerline is crossing each ...
Kurt Cederholm's user avatar
0 votes
0 answers
30 views

Connecting QGIS through to "Acquire " SQL database

I have the connection working and have a list of tables but all are showing "no geometry" There are tables with xyz coordinates available but are still showing "no geometry" Is it ...
Hamish McLauchlan's user avatar
0 votes
1 answer
77 views

Register a view in ArcGIS returns error 999999

I have created a view in an enterprise geodatabase (SQL Server) using arcpy.management.CreateDatabaseView. It shows correctly in ArcMap, and now I want to register it properly. I have done this many ...
Berend's user avatar
  • 4,637
0 votes
0 answers
52 views

GeoDjango support for Microsoft SQL Server

From what I've been researching and testing, it seems SQL Server is not fully supported by GeoDjango. Is this correct? Ive been running into errors such as "'DatabaseOperations' object has no ...
Jorge Urena's user avatar
0 votes
0 answers
39 views

STConcaveHull with MS SQL Server

MS SQL Server supports the STConvexHull function but not the STConcaveHull function. https://learn.microsoft.com/en-us/sql/t-sql/spatial-geometry/stconvexhull-geometry-data-type?view=sql-server-ver16 ...
Hakan Tugay's user avatar
0 votes
0 answers
18 views

Making GeoServer use Windows ADP to access SQL database

I will start this by saying i'm completely out of my depths with this, but alas, I will try anyways. I'm trying to create a WMS of the spatial layers in our project for our tablets to use when we are ...
Mow's user avatar
  • 175
1 vote
0 answers
52 views

Connecting QGIS to SQL server -- not showing sde

I have problem with seeing/making connection to spatial data on SQL Server with QGIS while I can normally see it (on the same SQL Server) with ArcMap. I should use the same user and password for both ...
Mart's user avatar
  • 11
1 vote
0 answers
90 views

Create dynamic layer based on a query in ArcGIS Pro: "ERROR 000055: Cannot create a Query Table for this workspace" when using "Make Query Table"

I have connected the SQL database server myserver in ArcGIS Pro. It then appears as myserver.sde under Databases in the Catalog window. Points can be visualized in a map with the fields X and Y (EPSG:...
stonebe's user avatar
  • 445
0 votes
0 answers
132 views

Utilizing spatial index in SQL Server

I have a table Points with shape column for points of geography type, and a spatial index on the column to improve performance.. CREATE TABLE Points(id VARCHAR(10) PRIMARY KEY, shape geography); ...
Sam's user avatar
  • 11
0 votes
1 answer
269 views

GeoServer 2.23 error when opening layer preview

I've made a fresh new installation of GeoServer v2.23.2 on a Windows Server 2019 machine, running on Java SE v11.0.20+9-LTS-256. Everything seems to work, except for the layer preview... Whenever I ...
Cheshire Cat's user avatar
0 votes
1 answer
108 views

Does MS SQL server actually support spatial joins?

I have tried these ways to run a spatial join select * from a join b on GEOMETRY::STWITHIN(a.geom, b.geom) = 1 select * from a join b on a.geom.STWITHIN(b.geom) = 1 Both return the error:...
user55570's user avatar
  • 156
0 votes
0 answers
50 views

Unable to load layer default style from MSSQL database

I have a point layer in MSSQL database that has a relation with a polygon layer that is also stored in the same database. Both layers have default styles stored in layer_styles table in the same ...
Ivan Marjanović's user avatar
1 vote
1 answer
158 views

Unable to load data from a shapefile to SQL Server 2019 [closed]

Windows 10; GDAL 3.3.0; QGIS 3.2; Sql Server 2019; ODBC Driver 17 for SQL Server When I try to load my shapefiles into my SQL Server no rows are loaded, only the table structure for each shapefile. I'...
FatsGordon's user avatar
1 vote
0 answers
29 views

Join all results from a one to many join in ArcGIS Pro

I want to join all possible results (up to 5 counties intersect ZIP codes) from ZIP_County_Intersect to be populated as the null County fields in ZIP_County_Dissolve. These results are coming from ...
rachel.passer's user avatar
0 votes
0 answers
11 views

Importing shapefile from ArcGIS to SQL Server database without using deprecated geodatabase [duplicate]

I am having issues with importing the shapefile in ArcGIS Pro into the SQL Server database. It shows an error output and an empty table when it is imported. The only time I see this is working is when ...
zenmo's user avatar
  • 1
0 votes
0 answers
14 views

QGIS: Creating duplicate database merges all points, geometry remains separate but trying to select one selects all

The duplicate database was created using various methods (to debug this issue), FME writing a new database based on the old database as input, MSSQL Management Studio, SQL, as well as putting the ...
Tobias Holms's user avatar
0 votes
0 answers
29 views

SQL server zoom to extent for geography

I am working with spatial objects in SQL server 2016/2019. If I select a geometry, SQL server gives me a nice spatial view that shows the geometry nice and big in the screen. But if I do the same with ...
user55570's user avatar
  • 156
2 votes
2 answers
212 views

Getting SQL that defines Query Feature Class using ArcPy with ArcGIS Pro

A map in my ArcGIS Pro 3.0.3 project has a layer with a Query Feature Class as its source. I can see the SQL that defines the Query Feature Class by looking at its Layer Properties. That SQL is ...
PolyGeo's user avatar
  • 65.1k
0 votes
0 answers
27 views

Trying to run TableToTable tool to export view from SQL server database to enterprise SDE in standalone Python script

I’m trying to export a view from an SDE connection to a SQL server database to new table in an enterprise SDE database. Both are saved as SDE connection files on a file share. I’m getting ERROR ...
TylerArmstrong's user avatar
0 votes
0 answers
520 views

Connecting to MSSQL Server - QGIS 3.28 & Ubuntu 23.04

I've been using QGIS + Ubuntu for some time now, great combination. Last week I've updated from Ubuntu 22.04 to Ubuntu 22.10 and subsequently to Ubuntu 23.04. During this upgrade the system has ...
Leandro Sastre's user avatar
1 vote
0 answers
47 views

Clipping line features to polygon in SQL Server

I am trying to figure out how to clip a rivers layer to a polygon layer in a view. Below is the code that I tried but I receive an error (i.e. SQL Error [4145] [S0001]: An expression of non-boolean ...
Nicole's user avatar
  • 19
0 votes
1 answer
27 views

Error in Python script while executing through enterprise geodatabase (working fine FGDB) [closed]

I have the following script: workspace = r"D:\\Python\\Cend.gdb" MEGIS_ELECTRIC_CircuitSource = "CircuitSource" Fc = "ElectricDistribution\\...
Rpandia31's user avatar
  • 141
1 vote
0 answers
280 views

How to publish or replace the data to the feature layer hosted?

A little background: My teammate has created a hosted feature layer. I access the data of hosted feature layer using ArcGIS API for Python and pull the data. The hosted feature layer he created doesn'...
SC_Python's user avatar
0 votes
0 answers
33 views

SQL Server ArcSDE spatial index behavior

Does anyone know if there is harm in bypassing the ESRI GUIs and simply rebuilding the spatial index on a feature class natively via SQL Server? When attempting to do so via the GUIs, there is a ...
Random Geo guy's user avatar
0 votes
0 answers
39 views

Issue with Query Layer and view ArcGIS 10.7

I've encountered an issue regarding working with views in SQL Server Enterprise. There is a Left Outer Joind view created by joining two tables (Spatial) and using fields from only the Left side with ...
Ali's user avatar
  • 1
0 votes
0 answers
23 views

Import Texas House map PlanH414 into SQL server using ArcGIS online

I would like to know if there is a way to import a specific shapefile into SQL Server 2016. The shapefile is downloadable from https://data.capitol.texas.gov/dataset/planh414. We have access to ArcGIS ...
benik9's user avatar
  • 101
1 vote
0 answers
44 views

QGIS - Connect to DB using Task Manager (problem)

As I have a lot of layers, I am writing a plugin that will import layers through TaskManager. Script imports layers successfully into the project with some minor problems. When layers are loaded I can ...
MatijaG's user avatar
  • 11
1 vote
1 answer
283 views

Use ogr2ogr/ogrinfo to connect to MSSQL on Ubuntu Server

OS: Ubuntu Server 20.04; Software: GDAL/QGIS, ogr2ogr/ogrinfo My goal is to use ogr to pull data from MSSQL as part of a longer process that I'm working on. First step is to test out the connection ...
MidPiedmont's user avatar
1 vote
0 answers
51 views

Setup a QGIS model to run on an Ubuntu server automatically

I made a QGIS model tool that pulls a copy of two datasets from a MSSQL db and runs several sets of geoprocessing tasks and outputs a single resulting dataset to a pgSQL db. This process runs ...
MidPiedmont's user avatar
1 vote
0 answers
126 views

Is there a faster approach to change a data type on a feature class field in ArcGIS Pro 2.9.5?

I've followed the "Calculate Field Tool" steps from this article https://support.esri.com/en/technical-article/000023089 to change the data type on a field but it takes so long to copy the ...
Allex Santana's user avatar
0 votes
1 answer
61 views

Configuring the database for a new GeoNetwork Installaion

I have some questions after reading the documentation for "Configuring the database" for version 4.0.x GeoNetwork. The documentation states: "The database dialect is configured in /WEB-...
Philip Whitten's user avatar
0 votes
1 answer
28 views

Force GeoServer to make use of carriage return from SQL Server

I'm completely new to GeoServer. In desktop GIS I can use CHAR(13) in views on SQL Server to make GIS interpret a carriage return, when I visualize a label. Is this possible using GeoServer? As I ...
Joachim Mahrt's user avatar
1 vote
0 answers
172 views

Issues saving and retrieving data from MS SQL Server with QGIS

Wondering if anyone has issues with geometry not loading into QGIS when sourced from MS SQL Server for following specific case. Software specifics: MS SQL Server spatial :15.0.2000.5 Standard Edition (...
karunakar's user avatar
3 votes
0 answers
159 views

QGIS has started putting all features into one row in Attribute Table

This is a bit of an odd one. We host our data in an Microsoft SQL Server database, and until a couple of weeks ago this was working fine. We've got about 17000 rows in it, all with a geometry. When I ...
user25730's user avatar
  • 884
-2 votes
1 answer
170 views

Float data type data shows null in attribute table [duplicate]

When I tried to open table from MS SQL Server, float data type data shows null in the attribute table. It only shows only one record.
Saidatta's user avatar
0 votes
0 answers
92 views

Convert PostGIS to MS SQL inside web app using ogr2ogr.py and Docker

I am trying to convert a PostGIS database to a SQL Server database inside a running Flask app. There are three docker containers running: web: flask app postgis: PostGIS database mssql: MSSQL ...
linus's user avatar
  • 101
1 vote
0 answers
128 views

Cannot Append date field - getting NULL values

I'm working on a standalone script that appends data from a SQL Server table onto an SDE db table. When working directly in ArcGIS Pro - the append works fine, but using a standalone script - dates ...
Fire GIS Guy's user avatar
2 votes
1 answer
501 views

ArcGIS Pro unable to add SQL database object when new fields had been added

About 90% of the layers on my maps are query layers from SQL Server database connection. My typical workflow is to drag and drop the spatial objects from the Catalog pane into the map frame and then ...
aakims's user avatar
  • 21
0 votes
1 answer
545 views

SQL Server: Coordinate conversion from NZTM to WGS84

I got a table that has shape value in one of the columns. I am converting shape value into geo_json formate and calculating centroid value and saving in two columns. The coordinate system of shape ...
user2293224's user avatar
2 votes
1 answer
380 views

Loading MS SQL table into QGIS using PyQGIS

I'm hoping to have some pieces of code on hand that link QGIS to a MS SQL database. All the tables in the database lack geometry, but have X Y Z coordinates. The database is password protected but I ...
Dan Coutts's user avatar
2 votes
1 answer
264 views

Publish UTM from geoserver using mssql geometry

I have my world lat, lon coordinates insert in an ms sql geometry column like this: geometry::Point(56.120417, 10.159337, 0); I have an ms sql store in geoserver and a layer that exposes these ...
noontz's user avatar
  • 123
0 votes
0 answers
185 views

Enterprise geodatabase maintenance Esri vs. SQL Server (rebuild index and update statistics)

I'm looking at two geodatabase maintenance practices and seeing if they need to be updated/refined, and I'm noticing that these can be accomplished via ESRI tools or directly via SQL / within SQL ...
Peter Bishop's user avatar
0 votes
1 answer
61 views

Creating DbGeometry instances that honor SRID

I maintain an ArcMap Add-in tasked with allowing people to see & edit some native SQL shapes in ArcMap, which of course require working with SqlGeometry and DbGeometry types. Converting between ...
Dan Narsavage's user avatar
0 votes
1 answer
615 views

Microsoft SQL Server "There is already an object named 'geometry_columns' in the database" error

I have trouble adding new layers to the existing MS SQL Server database. Whenever I try to add any type of spatial layer I encounter an error, as follows: [Microsoft][ODBC SQL Server Driver][SQL ...
Maciej_Szypulski's user avatar

1
2 3 4 5
19