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
1
vote
0answers
21 views

Esri enterprise GDB features showing as non-spatial table in QGIS [closed]

Why are Esri's Enterprise geodatabase (in MS SQL Server) feature classes showing as non-spatial table in QGIS and spatial data manager? I tried to connect to the enterprise GDB From QGIS, and it ...
0
votes
1answer
27 views

Viewing MSSQL data in QGIS

I am working with spatial data stored in an MSSQL 2012 database as varbinary. I am able to view the spatial data in SSMS with the following query: SELECT geometry::STGeomFromWKB([column_name], 4955) ...
1
vote
0answers
34 views

Attribute objects in Enterprise geodatabase automatically

There is a Enterprise geodatabase (MS SQL Server, ArcGIS), it has about 100 feature classes. It is necessary to automate the process of populating a unique number to each object in the database. ...
0
votes
0answers
9 views

QGIS Map Server WDS with MSSQL Datasource Publish

Does QGIS Map Server support a WDS Layer with data driven from MSSQL. Currently it states that the layer is invalid when trying to publish this type of layer within a project. Any help would be ...
0
votes
0answers
21 views

Saving changed positions in SQL Server table X, Y columns

I have a SQL Server table with X,Y columns linked to QGIS 3.6, and I made a virtual layer of it using "MakePoint(X,Y,CRS_id) as geometry". Now I want to shift a point in the map and have the change ...
1
vote
1answer
52 views

Non-spatial SQL Server table with X,Y fields directly in QGIS?

In QGIS 3.6 I linked a SQL Server table with a field 'X' and a field 'Y', together representing positions in a known co-ordinate system. How can I show these positions directly in QGIS, without ...
1
vote
1answer
32 views

ST_Force2D in SQL Server alternative? 3D loading problems from QGIS to PostGIS

I am having problems loading a 3D layer from MS SQL Server to PostgreSQL PostGIS database with QGIS. The PostGIS data loader in DB Manager and other import tools in QGIS have problems with 3D export ...
0
votes
0answers
26 views

Load CSV file Polygon Column to Microsoft SQL Table

Is there a best practice for importing a polygon from CSV to SQL? I have attempted to use the SQL Import and Export wizard to load it in as varchar(max) and then convert using geography::Parse(column)...
3
votes
1answer
73 views

Performance of arcpy.Exists() in SQL Server enterprise gdb environment

While iterating on a list containing table names, I used arcpy.Exists() to check if a table/featureclass exists. This action is very time consuming. I've ended up using a database approach select ...
1
vote
2answers
67 views

Visualize geographic spatial data from SQL Server directly in PowerBI

Is it possible to directly query geographic spatial data form SQL Server in PowerBI like its possible with Tableau? https://cloudblogs.microsoft.com/sqlserver/2018/05/14/visualize-geographic-spatial-...
0
votes
0answers
40 views

Error when register database with ArcGIS server, failure to access the DBMS

The connection property set was missing a required property or the property value was unrecognized. Failure to access the DBMS server: Machine: DESKTOP-TFF79J4 [db: The connection property set was ...
1
vote
0answers
25 views

How to get geographic data of any particular region of map in Geometry datatype format in SQL Server? [closed]

I am completely new to Geometry datatype format of a Microsoft SQL Server database. DataType is Geometry. If not wrong, geographic data contains latitude and longitude of each point of that map, ...
2
votes
0answers
30 views

Having functional copy of geodatabase in same SQL Server instance? [closed]

Having an Esri Enterprise geodatabase, I want to have a copy of the database in order to make some tests. I have an instance of SQL Server, and I do not want the overhead of installing and maintain ...
2
votes
0answers
33 views

Running ogr2ogr script batchfile from SQL fails due to temporary drive mapping

I am trying to run the SQL procedure EXEC xp_CMDShell 'blahblah.bat' which needs to run an ogr2ogr script to create a kml from sql. The batch file works if I run it alone but with SQL permissions it ...
0
votes
0answers
32 views

Google Earth like tool to direct query spatial data from an SQL database

I'm looking for a desktop reporting tool which allows me to query spatial SQL data via direct query. I'm looking for a simple application end user without any GIS knowledge can use. I've tested ...
1
vote
1answer
56 views

ArcCatalog not showing view just created? [closed]

I have a geodatabase with a feature layer of parcels and a scalar database of consumption data for those parcels. Using SQL Server 2012r2 and ArcGIS 10.5. In ArcCatalog, I open the parcel database ...
0
votes
0answers
15 views

mssql Vectorlayer import have no Coordinatesystem

Hi I'am using QGIS Version 3.4.6. If I add a Vectorlayer out of my mssql database a CRS dialog pops up for choosing a coordinatesystem. Like loading layer without CRS. uri = QgsDataSourceUri() uri....
1
vote
1answer
41 views

Connect to a SQL Server database from MS Access [closed]

I have an existing Microsoft SQL Server database which has been configured as an Enterprise geodatabase. I want to access it in MS Access in order to extract data to populate a form. What is the ...
0
votes
2answers
23 views

Storing related tables and toolboxes within feature dataset?

I am new to Enterprise geodatabases and am looking for some information regarding data structure and storage. Within my organization, we would like to store individual projects by feature dataset ...
1
vote
1answer
42 views

AutoCAD Map/Civil 3D Feature Data Object (FDO) layer displays but is no longer editable

Just over a week ago, one of our main GIS layers became uneditable. Our GIS layers are connected to AutoCAD Civil 3D (Fig.3) via an SQL Server Spatial Connection in the Task Pane. We were able to edit ...
0
votes
0answers
22 views

What would cause editing capability difference for same geodatabase connections?

In ArcMap 10.5.1, from Computer 'A', I am receiving a 'no editable feature layers' error when trying to edit feature class 'X' that is in a SQL Server Geodatabase. However, I am able to edit feature ...
1
vote
0answers
26 views

Copy Rows to SQL Server Table using ModelBuilder?

I want to copy a table in my GDB to a table in MSSQL server 2012. I'm using the "Copy Rows" tool in ModelBuilder, but when I run it, I get the following error: ERROR 000210: Cannot create output ...
0
votes
0answers
15 views

Field Names in ArcGIS Pro Query Layer for SQL Server Database [duplicate]

I successfully connected internal SQL Server Database to ArcGIS Pro and loaded a list of database tables it contains. When I want to create a Query Layer on the database I always run into the error ...
1
vote
1answer
35 views

Extract intersecting polygon from multipolygon search

I'm using the latest SQL Server and trying to build a query where i can search a database of spatial data and find the intersecting polygon. The problem is that the spatial data can be of ...
2
votes
0answers
20 views

arcpy.ArcSDESQLExecute with UPDATE and OUTPUT

Is there a way to get OUTPUT through arcpy.ArcSDESQLExecute? Whatever I do I get only True. When running UPDATE through MS SQL Server Management Studio I get OBJECTID of all updated features (rows): ...
0
votes
1answer
81 views

OGR2OGR -overwrite mssql table is appending instead

I am running Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt', '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;...
0
votes
1answer
45 views

MSSQL performance with Geography (point within polygon)

I have a query, below, that works - however its very slow, looping through roughly 24,000 points per second. This is a rather high end production DB server with MSSQL and SDE, and in other instances a ...
0
votes
1answer
22 views

ogr2ogr Warning 502: Field name 'yyy xx' contains invalid characters. 'yyy_xx' will be used instead

On MSSQL tables/views that have field names with spaces or starting with a number we get the warning 502 re: replacing invalid characters with a _ As we re-injest some of these files into MSSQL and ...
0
votes
1answer
116 views

ogr2ogr conversion failed when converting the varchar value to data type int

I keep getting this Error 1 when I run the following on some tables ogr2ogr -skipfailures -f "MapInfo File" -lco overwrite=yes -lco launder=no -lco relaxedFieldNameMatch "D:\QG\CREFNO.tab" "MSSQL:...
0
votes
1answer
41 views

Uploading TAB data to MSSQL using ogr2ogr

I have been trying various methods to import a shapefile into MSSQL but keep getting FAILURE: no source datasource provided. ATTEMPTS ogr2ogr -f "MSSQL:Server=xxx;Database=_GIS_Test;UID=yyy;PWD=...
1
vote
1answer
61 views

Converting MSSQL linked MapInfo Tab file to a shapefile using ogr2ogr

I have some tab files that are actually references to a view in a MS SQL Server table. It looks like begin_metadata "\IsReadOnly" = "FALSE" "\MapInfo" = "" "\MapInfo\TableID" = "055372be-523f-430a-...
0
votes
0answers
18 views

In QGIS3 graphical modeler can I access a mssql based view as an input?

Is it possible to set the input file of "Extract by Attribute" to an mssql based table view? In the drop down to choose the input DB I don't see the loaded db view and don't see a way to connect one ...
0
votes
1answer
161 views

Database support in GE Smallworld?

What database engine can be used for GE Smallworld? I have poor information but I read about Smallword proprietary VMDS. Is it possible to use Oracle or SQL Server?
2
votes
0answers
78 views

T-SQL Invalid Geometry Created by Intersection

I have two sets of geometries (A and B) in SQL Server 2016. I want to determine the overlap areas of those geometries from set A that intersect set B. Most of the time this code works: SELECT a....
1
vote
1answer
52 views

Using data from SQL Table instead of File Geodatabase Table

Does anyone know of a method to use the table from SQL Server table using OS Authentication, instead of a File Geodatabase Table in ArcPy? I have been using the below to reference the table ...
0
votes
0answers
117 views

Connect to MSSQL from QGIS on Mac

I tried to connect to MSSQL from QGIS and I couldn't find any solution to my problem. I install MSSQL on my Mac with Docker and try to connect QGIS with localhost(host=localhost) and left the DSN ...
1
vote
1answer
95 views

Open a MSSQL Spatial View in QGIS

I have created a view in MSSQL Server 2012 that does a spatial join as below: SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 100)) AS PID, DS.Dip_No, PB.SP_GEOMETRY FROM dbo.Dipsites AS DS INNER JOIN ...
0
votes
0answers
34 views

export pymssql query to geodatabase table

I have thousands of databases in Microsoft SQL Server and I want the user to select the server and DB they want so I cannot use arcpy.ArcSDESQLExecute I am trying to use pymssql to connect to the ...
1
vote
0answers
54 views

Load Raster from MS SQL Server into QGIS

Attempting to connect to an MS SQL database in QGIS. Database connects fine, and all the vector items load correctly. Rasters, however, appear as polygons, geometry column shows as FOOTPRINT, and ...
2
votes
1answer
143 views

How to access data from a registered SQL Server database in ArcGIS Server

Little bit of background on the problem: I have been working on a PHP application with an SQL Server backend. The application works through a web browser, but, I've recently been tasked with allowing ...
2
votes
0answers
291 views

Error QODBC driver not loaded when trying to connect to an MSSQL database from QGIS 3.4.3 (Ubuntu)

I have installed QGIS Desktop (latest one: 3.4.3 Madeira) along with the unixODBC-dev for SQL Server 2017 (following instructions here). I used sqlcmd from msql-tools and successfully connected to the ...
0
votes
0answers
28 views

Connect Mapnik to MSSQL

I want to connect Mapnik to MSSQL Spatial SDE, but I don't know how to do this. import mapnik m = mapnik.Map(256,256) mapnik.load_map(m, "test.xml") m.zoom_all() mapnik.render_to_file(m, "2.png") ...
1
vote
0answers
49 views

QGIS 3.4.2 SQL data not displaying on map

When I connect to SQL Server and tick 'Only look in the geometry_columns metadata table' it speeds up the scan but then when I add the feature class to the map it only appears in the layers list and ...
0
votes
0answers
84 views

Adding ArcGIS Pro Query Layer?

I am attempting to add a query layer to ArcGIS Pro 2.1.2 via SQL Server. The table consists of Ticket_ID, Latitude, Longitude. The query layer works if I only add the top 1000 rows. However, when I ...
0
votes
1answer
131 views

Create Database View with ST_Within Query

I see several other questions similar but none that apply directly to mine. I am using ArcGIS Desktop 10.6.1 with SQL Server running my Enterprise Geodatabase. I have a very large point feature ...
2
votes
0answers
44 views

Use PYQGIS to view MS SQL Server temporary table in QGIS

I'm working on a QGIS plugin to query a non spatial database held in MS SQL Server and to display the results of the query as a non spatial table in QGIS. I've tried the following: create global ...
2
votes
0answers
179 views

From ESRI:103300 to EPSG:4326 in SQL Server

This question is more or less a sequel to Performance of joining tables on a geometry column with SQL Server As explained in the above link, I have a shapefile that I upload to my SQL Server DB using ...
1
vote
0answers
48 views

How to deal with decimal separator when uploading geometries to MSSQL server using shape2sql.exe?

I'm using Shape2Sql.exe to upload .shp shapefile to MSSQL server 13.0.4502.0 on a Win10 64bit laptop. I've added Shape2Sql.exe.config <?xml version="1.0" encoding="utf-8"?> <configuration>...
1
vote
1answer
87 views

24412: Not valid because the interior of a polygon with rings (2) and (1) is not connected

I've got geography in sqlserver that is invalid. Running IsValidDetailed() I get the reason as 24412: Not valid because the interior of a polygon with rings (2) and (1) is not connected. But I don'...
2
votes
1answer
130 views

Exporting SQL Server .bak files to a shapefile? [closed]

I have no experience using Microsoft SQL Server at all. Someone gave me a .bak file of their database and said that I can extract their spatial data that way. They said that they would not export them ...