sql-server-2016

Transforming Data from GeoJSON to SQL Geography

两盒软妹~` 提交于 2020-01-03 03:01:06
问题 The basics first, server is MS SQL Server 2016 developer edition, and I'm transforming county shape data that is stored in a NvarChar(max) column as GeoJson to a sql geography field for better storage and spatial indexing. Right now the data is stored as blobs, and I'm trying to optimize storage and create spatial indexes to speed up location comparison (EG: Does X highway intersect with Y county). There is a lot of documentation on going from sql geography data to Geo-JSON, but not so much

Transforming Data from GeoJSON to SQL Geography

廉价感情. 提交于 2020-01-03 03:01:06
问题 The basics first, server is MS SQL Server 2016 developer edition, and I'm transforming county shape data that is stored in a NvarChar(max) column as GeoJson to a sql geography field for better storage and spatial indexing. Right now the data is stored as blobs, and I'm trying to optimize storage and create spatial indexes to speed up location comparison (EG: Does X highway intersect with Y county). There is a lot of documentation on going from sql geography data to Geo-JSON, but not so much

SSRS 2016 Native Double-Hop Windows Authentication

不羁的心 提交于 2020-01-02 09:19:34
问题 Myself and another admin have been trying to troubleshoot the double-hop authentication issue on our new reporting server (where the report runs as the authenticated user, but cannot delegate to the data source and returns a 'NT Authority\Anonymous’ authentication error) and we seem to be hitting a dead end. Here is a bit about our setup. We have SSRS 2016 installed on one server, and our data source for reports is on another server. We have done the following steps to try and enable

Computed Columns In Azure SQL Server 2016 Temporal Tables

你离开我真会死。 提交于 2020-01-02 04:05:22
问题 I am looking at creating temporal tables https://msdn.microsoft.com/en-us/library/mt604462.aspx in our database but I cant on a couple of tables that have computed columns. The error message returned is rather self explanatory "Computed column is defined with a user-defined function which is not allowed with system-versioned table" but I was hoping there was a way to exclude or ignore columns from being tracked? I have tried dropping the computed column creating the history table then adding

SSDT crashes when loading SSIS packages or new project

两盒软妹~` 提交于 2020-01-02 02:04:09
问题 With the release of SSDT 2016 (GA), I've loaded SQL Server 2016 GA Developer Edition, the new SSMS 2016 stand-alone build, and even Visual Studio 2015 Update 2 (Professional edition) and Visual Studio still crashes anytime I attempt to open an SSIS package or create a new solution using the SSIS template (including the import wizard). I've reinstalled using the suggested order (SQL Server 2016, SSMS, SSDT) as well as just Visual Studio 2015 followed by SSDT. Both result in the same crash. I'm

SQL Server - “for json path” statement does not return more than 2984 lines of JSON string

为君一笑 提交于 2020-01-01 19:24:15
问题 I'm trying to generate huge amount of data in a complex and nested JSON string using "for json path" statement, and I'm using multiple functions to create different parts of this JSON string, as follow: declare @queue nvarchar(max) select @queue = ( select x.ID as layoutID , l.Title as layoutName , JSON_QUERY(queue_objects (@productID, x.ID)) as [objects] from Layouts x inner join LayoutLanguages l on l.LayoutID = x.ID where x.ID = @layoutid group by x.ID, l.Title for json path ) select

Sql Management Studio 2016 could not load type

无人久伴 提交于 2019-12-25 09:22:54
问题 I just upgraded to SQL Management Studio 2016 CTP2 I get this error when logging into a db server: Could not load type 'Microsoft.SqlServer.Management.Dmf.FailedOperationException' from assembly 'Microsoft.SqlServer.Dmf, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. (ObjectExplorer) Here is the info in the about tab: Microsoft SQL Server Management Studio 13.0.500.53 Microsoft Analysis Services Client Tools 13.0.500.53 Microsoft Data Access Components (MDAC) 10.0.10586

how to difference of row numbers approach

杀马特。学长 韩版系。学妹 提交于 2019-12-25 01:37:05
问题 i have data like this table ItemId Value Date 1 2 2017-12-18 17:00:00.000 1 2 2017-12-18 17:02:00.000 1 2 2017-12-18 17:04:00.000 1 3 2017-12-18 17:06:00.000 1 3 2017-12-18 17:08:00.000 1 2 2017-12-18 17:10:00.000 1 2 2017-12-18 17:12:00.000 1 2 2017-12-18 17:16:00.000 1 4 2017-12-18 17:14:00.000 i want to output like this in sql server ItemId Value MaxDate 1 2 2017-12-18 17:04:00.000 1 3 2017-12-18 17:08:00.000 1 2 2017-12-18 17:16:00.000 1 4 2017-12-18 17:14:00.000 thanks for your anwsers.

Exclusive access could not be obtained because the database is in use - but the database is deleted

懵懂的女人 提交于 2019-12-24 20:03:20
问题 Has anyone run into this error even when the database is deleted? I deleted the database and checked the "close existing connections" box before deleting. I have a Live db and a Test Db. I have made a backup of Live. When I try to restore Live.bak to a database with name Test, I get the exclusive access error. I need to copy the Live db over Test. Funny thing is I can restore a backup of Test if needed. 回答1: It is always better to close existing connections before deleting ALTER DATABASE MyDB

Always Encrypted Feature - Failed to decrypt column. Call from Windows-Service App

只谈情不闲聊 提交于 2019-12-24 19:19:19
问题 .NET Framework Ver = 4.6.2 , Database = SQL Server 2016 App Type = Windows Service We are working on the "Always Encrypted" feature in the SQL 2016 db to perform the encryption on certain customer data columns. Our web application is built in the ASP.NET MVC architecture and is working fine with this new feature. We have copied and imported the certificate from the database server over to the IIS web-server. And the web-application is working smoothly. But when we try to access the DB from a