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.
925
questions
1
vote
1
answer
16
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 ...
1
vote
0
answers
24
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 ...
1
vote
0
answers
37
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 ...
0
votes
1
answer
19
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-...
0
votes
1
answer
16
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 ...
0
votes
0
answers
15
views
Visualise results from STUnion in SQL-Server 2008 R2
I have an SQL table which contains the buffers polygons of points. These buffers should now be aggregated any displayed as a single Polygon/Multipolygon. With the following command I think I can do a ...
1
vote
0
answers
48
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 (...
3
votes
0
answers
81
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 ...
-2
votes
1
answer
54
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.
0
votes
0
answers
31
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 ...
1
vote
0
answers
36
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 ...
1
vote
1
answer
101
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 ...
0
votes
1
answer
86
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 ...
2
votes
1
answer
80
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 ...
0
votes
0
answers
52
views
MSSQL : Find polygons with in a distance of a point
I am trying to find all polygons (both polygons and multipolygons) that are with in a certain distance of a point.
I have a table with both geography polygons and multipolygons. I want to set a point ...
0
votes
0
answers
41
views
Datatype mismatch in enterprise geodatabase
An ArcSDE geodatabase is connected to a Microsoft SQL Database Server. In my process, I run some SQL commands to push data from MS SQL Server into other applications. I received the following error ...
2
votes
1
answer
86
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 ...
0
votes
0
answers
57
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 ...
0
votes
1
answer
31
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 ...
0
votes
1
answer
263
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 ...
2
votes
0
answers
96
views
Cannot add geometry layer to QGIS although geometry column is recognized
The geometry column POINT in the View (not Table) View_MyGeometry is generated in the SQL database GeoData with Microsoft SQL Server Management Studio. QGIS recognizes this column as a geometry column ...
0
votes
0
answers
79
views
GDAL Appending Shapefile to SQL Error: Ogr2ogr ERROR 1: MSSQL extents query returned a NULL value
I have an OGR2OGR script to append a shapefile to an existing SQL table, but I get the error 'Ogr2ogr ERROR 1: MSSQL extents query returned a NULL value'. I have seen discussions with various ...
0
votes
0
answers
30
views
High margin of error for circle point calculation
Created a circle of points, 50m, 100m, 150m and 200m from a central lat/lng (51.500421, -0.124754) using the sql functions below (one for the lat the other lng). My concern is with the accuracy of the ...
1
vote
0
answers
46
views
Create grid around lat/lng with same spacing on the diagonal points using SQL Server
As an example I have a lat/lng circled in red below. I want to create a grid of points using SQL Server at 50m intervals up to 200m from the centre point. But those points that are on a diagonal are ...
0
votes
0
answers
44
views
Join to MSSQL table with no geom
I'm using QGIS 3.22.5. I want to join an MS SQL Server (MSSQL) spatial table to an MSSQL non-spatial table. I don't see that I can do this. Am I missing something? Can someone tell me how to add a ...
0
votes
0
answers
82
views
Publish a query layer from ArcGIS Pro to your GIS Server to maintain connection
I have a query layer pulling from a SQL Server database that I use within ArcGIS Pro and am wondering if there is a way I can publish this to our GIS server (10.8.1) to maintain connectivity to the ...
0
votes
0
answers
39
views
QGIS and SQL Spatial Feature Classes with multiple Geometry Types
I have noticed when adding a multiple Geometry type SQL feature to QGIS it displays as a line and I can't see other geometries apart from line geometies. Is there a way I can see all features? I can ...
0
votes
1
answer
63
views
GIS layers created using FME 2021 not visible in QGIS
QGIS 3.24
SQL Server 2015
I have GIS layers in SQL Server created using ogr2ogr and FME2021
All the layers are created using my machine.
In my QGIS Desktop I can see all layers irrespective of how ...
0
votes
0
answers
23
views
Merging SQL Spatial Polygons in QGIS 3 Not Saving due to Incompatible Geometry Types
We have SQL Spatial tables which accept multi-polygons and even have multi-polygon features. In QGIS we can add a part to an existing polygon even if not adjacent, but when merging we can't save.
The ...
1
vote
0
answers
126
views
Check if connected to geodatabase as database owner (DBO) with ArcPy
I was wondering if anyone knows of a reasonable workflow with ArcPy, for ArcGIS Pro/Python3 (or ArcMap 10.8.1/Python2.7, but I'd prefer a solution for Pro), to check if a given *.SDE connection file ...
0
votes
0
answers
140
views
Writing from file geodatabase to SQL Server 2017 instance using ogr2ogr
I'm attempting to import a large feature class from a file geodatabase to my SQL Server 2017 instance using GDAL. I have tried many different options on the ogr2ogr command and nothing seems to work. ...
0
votes
0
answers
31
views
JoinField doesn't concatenate date type fields from database view
I'm using this code to make a join to a SQL Server database view.
arcpy.management.MakeQueryTable(CEView, "CE", "USE_KEY_FIELDS", "SID")
arcpy.management.JoinField(...
1
vote
0
answers
173
views
Joining tables by more than one field in ArcGIS Pro
I am joining multiple tables together with different aspects of chemical analysis result data. Some of the joins need to match up with more than just the field they are being joined on. (I am ...
1
vote
1
answer
69
views
Deleted point layer reappears upon refresh in ArcGIS Pro
I've deleted a point layer from a SQL Server geodatabase in ArcGIS Pro (using the Pro UI). The deletion appears successful but upon refresh of the geodatabase, it reappears.
I haven't really seen ...
0
votes
0
answers
30
views
SQL Server WKT crosses antimeridian - sqlgeography looks normal, sqlgeometry does not
I have a WKT that crosses the antimeridian and is stored in SQL Server as a geometry. But when I read it back out it is stretched/skewed. If I take the WKT from the geometry, and create a geography ...
1
vote
0
answers
45
views
Update a table from a geodatabse
I use a Geodatabase on SQL Server, on which I base myself to configure tables of the bors and maps.
I tried to modify a few items in a table in this Geodatabase with a simple query (UPDATE...SET). I ...
0
votes
1
answer
67
views
In GeoServer, when adding a layer, how to list all tables when using a "Microsoft SQL Server" store?
Presently all the tables are listed when attempting to add a layer from a SQL Server store but the schema is not shown nor used in the definition. My database has about 3k tables so I'm thinking ...
0
votes
1
answer
512
views
Intersect points with polygons using SQL Server query from ArcGIS Enterprise Geodatabase
I have 2 databases in ArcGIS Enterprise Geodatabase in SQL Server. One database (DB_A) contains a feature class with points and the other database (DB_B) contains a feature class with polygons. I'd ...
0
votes
0
answers
250
views
MSSQL tables not displaying in QGIS and MapInfo depending on load process
Some tables in MSSQL are not available in QGIS or MapInfo but can be seen by Management Studio on the same machine.
QGIS
MapInfo
The ones visible (and with geom) in QGIS were loaded using the '...
0
votes
1
answer
20
views
Dataset won't upload with datastore
I have an SQL Server database that I have connected to Portal using a datastore. There are three datasets inside this database but for some reason only one of the three datasets are actually uploading ...
0
votes
0
answers
34
views
Batch Update GIS Data in QGIS
I am looking to batch update data in QGIS. Basically my QGIS Project data is connected to a SQL server. I have to update several hundred attributes with new data. I have the updated data in an excel ...
1
vote
1
answer
144
views
Does QGIS import SQL Server data or query it?
I have a SQL Server DB with about 200GB of various datapoints stored on server.
When I use this datasource in QGIS from my PC would all the data be imported?
I.e do I need to make sure I have 200GB ...
3
votes
0
answers
148
views
Efficient way to "gridify" SQLGeography shape
Read the "Background" below for full details of why I want to achieve this.
Given a shape, I would like to process it in such a way that it conforms to a 0.00001 x 0.00001 degree grid. (This ...
0
votes
0
answers
141
views
Unable to connect ArcPy with ArcMap to MS SQL Server accessed via ArcSDE
Why can I not connect my ArcPy to our enterprise database hosted on a Microsoft SQL Server?
I'm running Python 2.7, ArcMap 10.6.1, MSSQL Server 12.0 (2014)
I've created an SDE connection file in ...
0
votes
1
answer
54
views
Changing the origins of SQL Server polygon geometry
I've got a table with polygon geometries, all with their origins @ (0,0). I want to recreate these polygons with the same dimensions, but at different origin points(x,y). Because all the original ...
1
vote
0
answers
139
views
Converting GeoJSON point into polygon in React
I have a JSON file of areas making polygon. I have saved those files in SQL Server database so i convert GeoJSON into CSV and import in my database and now i want to connect database with React.js.
...
1
vote
0
answers
479
views
"Driver not loaded Driver not loaded" when adding MSSQL layer in QGIS
Similar problem as here and elsewhere...
When I try to Add MSSQL Spatial Layer to connect to an Azure-hosted MS SQL Server database, I get Error opening connection: Driver not loaded Driver not loaded ...
0
votes
0
answers
37
views
Can OpenLayers be used to show/edit electrical Single Line Diagram (SLD)
I have some spatial data source(SQL server tables with geometry fields) that contain
spatial data for single line diagram or SLD(here does not stand for styled layer descriptor) of electrical networks....
0
votes
1
answer
208
views
Getting all Datasets and/or Feature classes and consequently spatial data from Esri Structures in MS SQL
I'm looking for query Esri data on MS SQL Server (best by using pure SQL).
So far I'm using ArcPy from Esri Python toolset but that is far from being optimal.
Example of iterating through the entire ...
1
vote
1
answer
983
views
SQL Server STIntersects, STDistance and STCointains with Lat Lon points and Geometry Polygons [closed]
I need to create 3 functions in SQL Server (2017) that has to do the following:
IsPointInsideTown(Point, TownCode, [SRID]) -> true/false: indicates if the point is inside the town's polygon.
...