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
0answers
18 views

Creating database view in ArcMap

I have the following issue when using the Create Database View tool in ArcMap. My query runs fine in Microsoft SSMS and Visual Code (with mssql extension) against the enterprise geodatabase. But for ...
0
votes
0answers
14 views

SQL Server update statement using .NET made function does not run

In SQL Server I have a table called Track containing metadata of each track and a spatial representation of it: the field Geo, which is a LineString of the geography type. In Visual Studio I developed ...
1
vote
0answers
22 views

Converting non-simple geometries to simple so ArcGIS Pro can display and process them

In SQL Server 2016 I'm using GEOMETRY::UnionAggregate to dissolve some polygons into larger ones. Here is a simplified example of my select: select ta.TRANUM, GEOMETRY::UnionAggregate(pp.SHAPE) SHAPE ...
-2
votes
1answer
46 views

How to add NON_NULLABLE field in ESRI to an existing table?

Is there any way to add NON_NULLABLE field to an existing table with existing records? Just to make it a bit more fun the field must have Field domain parameter too. And I am fine to start with having ...
0
votes
0answers
34 views

GDAL OGR2OGR from gdbtable file to SQL Server table

There is an existing SSIS package that loads a gdbtable file into SQL server table using ogr2ogr. Command used is below --config SHAPE_ENCODING "ISO-8859-1" -append -update -f MSSQLSPATIAL &...
0
votes
0answers
15 views

ArcPy cannot open tables in Enterprise geodatabase

There are several scripts that create a geodatabase, modify the schema and insert data on the database. This scripts are designed as part of a solution. In a Nightly process this scripts are called, ...
1
vote
1answer
28 views

Deleting attribute fields through SQL Server Management Studio

I have a problem. After appending annotations into the feature class on the SQL Server database I need to delete extra attribute fields that where made in the process. Usually I would just simply use ...
0
votes
0answers
53 views

Deleted fields from table in SQL server management studio and now feature class is not working properly

I am running SQL server (v10.50.6220.0) on which there are stored a couple of my geodatabases (sde schema). Recently, I inadvertently deleted some attribute fields from an annotation feature class ...
1
vote
1answer
34 views

QGIS Connection with MSSQL: does not work

With QGIS 3.14 I try to get access to a table in MSSQL with points of the GEOGRAPHY type. The table has a PK with clustered index, and a spatial index. There is a filled geometry_columns metadata ...
2
votes
1answer
56 views

How QGIS Python loop through all tables MS SQL Server?

I've got Python code on QGIS 3.12 that adds a MS SQL Server data layer to the map, but I need to add all of them. uri = QgsDataSourceUri() uri.setConnection(r"xx.xxx.xxx.xx\xxx", "xxxx&...
0
votes
0answers
24 views

How do I set the type of geometry when creating a SQL table?

The table I am trying to recreate has these properties Data Type File Geodatabase Feature Class Feature Type Simple Geometry Type Polygon <<<< WHAT I WANT TO RECREATE My target ...
1
vote
0answers
55 views

How to calculate a line from a position and bearing in SQL Server 2012 (Spatial)

Currently I've a table filled with measurements from a certain point. All the rows contain a location in Lat/Lon, a bearing in degrees and some other data containing sensor updates etc. At this moment ...
0
votes
1answer
15 views

Choose a specific geometry column of a Spatial View in a Microsoft database to plot feature points in ArcMap

I have created a Spatial View in a Microsoft SQL database (SQL Server Manamgement Studio v18.4), i.e. a View with spatial columns. This View contains the two following point geometry columns for two ...
0
votes
0answers
38 views

SQL query for adding MSSQL Layer

I want to add a mssql layer with a SQL query. It was no problem to do it for PostgreSQL but have somebody an idea of how it is working with the mssql database? uri = QgsDataSourceUri() uri....
0
votes
1answer
40 views

ArcGIS10.2 SDE relationship class referencing a deleted feature - how to clean up relationship class?

I am looking for a smart approach to cleaning up a relationship class, which consists of relationships that look at previously deleted objects. To illustrate, we have db.schema.SITE (spatial), db....
0
votes
0answers
11 views

Using SHAPE field in a covering index for SQL Server

Can I use the SHAPE field in a feature class as one field in a covering index? In addition to SHAPE, we almost always see reads on COLUMN2. I cannot create an index like this (SHAPE, COLUMN2) in ...
0
votes
0answers
28 views

SQL Server to generate points on map for web

These are my components: SQL Server 2016 with R-in-database. smb-share on a subdirectory underneath root directory of an IIS with enough rights to let R-in-database write files. Tables in ...
0
votes
0answers
55 views

Copy tables from Server Database to a Geopackage with no geometry and with geometries using PyQGIS

I am making an application in PyQGIS that uses tables that are on an SQL server. I want to make a copy of all those tables in a local Geopackage, because I want to use my application in my laptop ...
0
votes
0answers
48 views

Generate Points from inside SQL Geography

I have a shapefile which has been loaded into MS SQL-Server. Mostly polygons, but some multi-polygons as well. For each record, I need to generate a list of say 50 points that are within the polygon. ...
2
votes
1answer
33 views

How are Modifications and Deletions represented when looking at enterprise geodatabase delta (add, delete) tables?

I'm trying to understand how to make sure a delete is a proper delete and not a modification, and vice versa. I'm using ArcGIS 10.2 and Enterprise geodatabase on MS SQL Server. See below SQL: select ...
0
votes
1answer
59 views

Using Python, how to get SQL Server queried points in the map?

Since days I'm struggling with this problem, did a lot of searching - also in this forum - but did not find the answer I need. I have a layer 'Project' in QGIS that is connected to a spatial table in ...
2
votes
1answer
135 views

Using Python, how to select points within a certain radius of a certain point?

I have a spatial table in SQL Server with point features, and connected it to QGIS which neatly shows all points. Now I want to select points in this table (and show them in the map) within a certain ...
-2
votes
1answer
188 views

SQL Server how to create spatial index? ( spatial query )

I know how to do spatial query, Shape is my geometry type column. bbox is well know text format of a bounding box srid = 2229, you must specify this srid in where intersect clause ...
0
votes
1answer
56 views

GeoServer Microsoft SQLServer view not visible as WFS

I am running a GeoServer 2.16.2 that connects to a Microsoft SQL Server 2008 database using the SQL Server extension and the Microsoft JDBC Drivers. Java Version: AdoptOpenJDK: 1.8.0_242. I can ...
1
vote
0answers
92 views

QGIS 3.10.3 failing to recognize EPSG:27700 on MS SQL data

If I load data that's held in EPSG:27700 (British National Grid) on a MSSQL Spatial database (v13.0.5622.0) into an instance of QGIS 3.10 (new project, defaulted to 27700), the CRS does not get ...
0
votes
0answers
17 views

Adjusting nodes in SQL

The intranet our company is using is combining shapes to form larger shapes. This is using code that is lost in the darkest realms of extremely bad practices, but for the most part it is okay. ...
1
vote
1answer
229 views

How do I transfer data from a geopackage to MS SQL server

I am trying to upload a geopackage (created with ogr2ogr though I don't think that matters) to a MS SQL Server 2008 instance. I can't access the instance with ogrinfo all I can get is C:\>...
0
votes
0answers
287 views

Connecting to Microsoft SQL Server from QGIS

I can't connect my QGIS to SQL Server. This is my database: This is my connection configuration to QGIS If I press test connection it says "Driver not loaded". If i load database, there is ...
0
votes
1answer
28 views

Unable to connect to SQL Server tables with 10.5 ArcMap but it works with 10.7

I have a requirement where I need to connect to the SQL Server which I have created using ArcCatalog 10.7. I have a requirement where I need to now use 10.5 version. But when I attempt to connect to ...
1
vote
1answer
281 views

Convert a SQL Server Geometry into PostGIS spatial data with Python and shapely

I'm trying to migrate spatial data from a SQL Server database to a PostGIS database with Python. I need this to be automated since its not just one table, but a lot tables in a lot of databases. I am ...
1
vote
1answer
25 views

Display map object from SQL database in MapInfo with read only access to the database

I can connect MapInfo to a SQL database using a select statement to display the contents of a table in the SQL database. However, the table is not mapable and I only have read access to the database ...
1
vote
0answers
52 views

Poor performance when adding layer indexed ArcGIS Service layer to AGOL

My data sits in enterprise geoddatabases on Windows Server 2012, SQL Server manager. I often add ArcGIS Server Web services to my AGOL maps and they perform really well. However, when I add a ...
0
votes
1answer
54 views

Slow SDE Performance After Append - Geometric Network

I had an odd thing happen today, I do almost daily appends to our fiber network (fiber, splices, etc) and usually, it goes smoothly and with no complications. For some reason, I had an Append stall ...
1
vote
2answers
90 views

Convert shapefile into usable data

I am new to GIS data. Our organization uses ArcGIS to map parcels of land used for agriculture. The lowest addressable level is currently a single polygon, representing a parcel. Throughout the year, ...
2
votes
1answer
266 views

Can't convert a WKT with a Z value into a SQL Geometry value

I'm using nettopologysuite in c# to build a nettopology geometry object, and then save it as a geometry object in SQL. Generally this works fine, except i recent came up with (from a shapefile) the ...
1
vote
0answers
54 views

Pre-populating list in Survey123 using SQL Server column

What I currently have is a Survey which enters the data collected from the survey in a SQL Server table, I'd like for one of those columns in that table to become the choices in another survey. If ...
0
votes
0answers
105 views

Export geodataframe with shapely polygon to sql server table (geometry)

I'm pulling open street map data into a geodataframe and looking to write the results to a sql server database. The geometry types are polygon and they are in shapely format. When I attempt to write ...
0
votes
1answer
173 views

Use PHP form to insert geometry from WKT into SQL Server 2017

I have a PHP 7.3 form that asks the user for a Name, a WKT and an SRID. I would like to upload the WKT and SRID to SQL Server 2017 so that it creates a geometric object in Upload_WKT_Test using ...
1
vote
0answers
42 views

ArcGIS Pro PostgreSQL SSH connection string

I am involved in a project where a SQL Server-base application is being retired and replaced with a PostgreSQL/PostGIS-based tool under development. There is a large amount of cross-checking to be ...
0
votes
1answer
110 views

Using geometry stored in SQL Server table instead of WKT as input to function

I am new to SQL Server, I have a function called STVectorize that takes a geometry and breaks it down into its constituent vectors: SELECT e.[id], e.[element_id], e.[subelement_id], e.[vector_id], ...
3
votes
2answers
395 views

Combining ST Buffer and Intersect with Where clause

I'm trying to create a buffer around a single point in a spatial entity and finding all the points from a different entity that fall within that buffer. I tried two approaches. The code below runs ...
2
votes
1answer
160 views

Converting ArcSDE point data from image to MSSQL geometry

I have a bunch of points in an SDE table which is currently stored in an MSSQL database. The full entry is below, while the data i'm trying to convert from binary to geometry is: ...
2
votes
0answers
32 views

Cannot save to shapefile using ogr2ogr [closed]

I am trying to fix a bug in some software that exports to Shapefile and/or MapInfo files. I am struggling to wrap my head around this OGR2OGR stuff. The software will not export to shapefile and I ...
0
votes
0answers
78 views

Linking SQL Server database to ArcGIS Online

I'm not sure this is possible, and the ESRI documentation is a bit of a mess it seems. Or maybe it's not possible at all and the ESRI documentation is giving me the nearest it can. Basically, the ...
0
votes
1answer
47 views

Editing Point Data Layer made from Database Table using ArcGIS Pro?

I have a project in ArcGIS Pro which is connected to a SQL Server Database. I made a point feature layer from one of the tables however I cannot add points to the layer. I connected to the database ...
2
votes
0answers
77 views

Passing parameters from QGIS to a SQL Server stored procedure and link this as new layer?

I'm new to QGIS and may not have understood the principle properly yet. I'm coming from database development. Question: I have a stored procedure in SQL Server that uses a date range as a parameter. ...
0
votes
0answers
77 views

Deploy/ Copy Feature Class under users AD account with gis Schema,

This question is regarding to SQL Server 2017 and ArcMap or ArcMap Pro environment. Little history: Currently GIS team deploying/Copying Feature class (FC) from ArcMap 10.4 or Pro under one SQL ...
1
vote
0answers
39 views

Getting geodatabase to SQL Server

I am currently attempting to load in 1000 data sets I have in 1000 different tables. I need to do this in Microsoft SQL Server. My data sources are either in Excel or geodatabases. The plan is to ...
1
vote
2answers
207 views

Reducing coordinate decimal places in WKT using C#?

I have imported several shapefiles into a Microsoft SQL Server 2017 database When I use the STAsText() function on geography objects I get the following WKT: SELECT [Adm0GeoBoundaryID] ,[...
2
votes
1answer
109 views

Optimising Large Spatial Queries in SQL

I'm sure similar answers have been given elsewhere but no matter what I have tried I am unable to optimise this query. Details: TableA has 3.5mill records TableB Had 57000 records but I have ...

1
2 3 4 5
18