Use this tag for questions specific to the 2017 version of Microsoft's SQL Server.
Questions tagged [sql-server-2017]
1512 questions
10
votes
0 answers
Why does a merge into a temporal table with a nonclustered index in the history table throw an error
I get the following error when I try to merge under a few conditions. Is someone able to explain why? Seems like it's a problem with SQL Server itself, but I wanted to post it here to confirm.
Attempting to set a non-NULL-able column's value to…

CSharpFiasco
- 204
- 3
- 8
10
votes
2 answers
SQL Server 2017 relative path issue
Encountered interesting problem after migrating to SQL Server 2017.
Absolute path test
backup database master to disk = 'C:\Temp\1\2\3\master.bak'
Backup is created in C:\Temp\1\2\3\ as expected.
Relative path test #1
backup database master to disk…

Alex Aza
- 76,499
- 26
- 155
- 134
9
votes
2 answers
Execute Package Utility (dtexecui) not installed after installing SQL Server 2017
I was not able to find Execute Package Utility (dtexecui) after installing SQL Server 2017. Was not able to find any standalone installer from Microsoft to install it as well. Will any one please guide me on installing it to run my SSIS Packages?

CDD Gateway
- 91
- 1
- 1
- 2
9
votes
1 answer
Why does COUNT(*) require SELECT permission on all table columns on SQL Server?
I recently encountered the problem that COUNT(*) requires the user to have select permission on every single column of a table.
Even though the spec of 'COUNT(*)' explicitly says that
it does not use information about any particular column.
It…

Bluuu
- 482
- 4
- 12
9
votes
3 answers
+= in SELECT clause; constant vs column
I observed some strange behavior in MS SQL Server 2017.
+= in select acts as aggregator ('concatenate values from all rows') when on the right is a constant.
+= in select acts as 'just set the value' when on the right is a column name. (also, this…

IndustryUser1942
- 1,052
- 1
- 8
- 12
9
votes
2 answers
PYODBC truncates the response of a SQL Server FOR JSON query
I'm having issues trying to get a SQL Server JSON result set to play nicely with PYODBC. My Python/Flask skills aren't the best, so I'm not entirely sure if this is something stupid I'm doing, or that the driver doesn't work with JSON.
The failing…

Mark Sinkinson
- 970
- 6
- 18
8
votes
0 answers
How can SQL Server client get information on TLS certificate being used?
If a client connects to SQL Server, and a certificate is used to power TLS encryption, how can i get information about that certificate?
Ideally i want all the details, but i'd be happy with
Issuer: SSL_Self_Signed_Fallback
Issued to:…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
8
votes
3 answers
Left-join EXCLUDING matching records?
Traditional left-join returns all records from the left table, including matching records:
I want to use the join to exclude matching records, and return only non-matching records from the left table:
Shown below, is the code I came up with so…

Giffyguy
- 20,378
- 34
- 97
- 168
8
votes
3 answers
Failed Start for Microsoft SQL Server Database Engine on Linux
I have installed mssql on Ubuntu 16.04. following are the details of sql server.
ms sql (14.0.3015.40-1) i.e SQL server 2017.
when I run the configuration command #sudo /opt/mssql/bin/sqlservr-setup
I got error sudo: /opt/mssql/bin/sqlservr-setup:…

chetan
- 953
- 3
- 12
- 20
8
votes
1 answer
SQL Server 2017 multidimensional mode needed
MS SQL Server 2017 (developer edition) is connected and running on my PC. However, when I want to start the develop process in MS Visual studio 2017, it is giving me the following error:
You cannot deploy the model because the localhost deployment…

Said Akbar
- 423
- 1
- 3
- 15
8
votes
2 answers
"Oops" error while installing SQL Server 2017 developer edition on Windows 10
I'm trying to install SQL Server 2017 Developer edition with "Basic" installation type but it gives below error message:
Oops...
Unable to install SQL Server (setup.exe).
Build version it is trying to install is 14.1710.3866.2
I've already tried…

RBT
- 24,161
- 21
- 159
- 240
7
votes
1 answer
Check if JSON contains a property
I am reading microsoft docs ms sql JSON options
And I would like to check if my column Settings which is nvarchar, I put there some JSON, and if that JSON contains property name.
Is it doable?
something like:
DECLARE @info…

Stefan0309
- 1,602
- 5
- 23
- 61
7
votes
2 answers
OLE DB provider 'for linked server returned data that does not match expected data length for
I get an error querying a remote postgresql server from my sql server 2017 Standard via a linked server
this is the query:
SELECT CAST(test AS VARCHAR(MAX)) FROM OpenQuery(xxxx,
'SELECT corpo::TEXT as test From…

Gabriele D'Onufrio
- 405
- 1
- 5
- 17
7
votes
5 answers
How to show day name in SQL Server?
I have a query on the SQL server
I want to display as below:
CDATE | CDAY
2019-04-01 | Monday
2019-04-02 | Tuesday
... | ......
2019-04-30 | Tuesday
But I found error as below:
Conversion failed when converting date and/or time from…

Momo
- 79
- 3
7
votes
9 answers
Optimize temporal table with CTE
I create temporal table in order to set level :
CREATE TABLE [#DesignLvl]
(
[DesignKey] INT,
[DesignLevel] INT
);
WITH RCTE AS
(
SELECT
*,
1 AS [Lvl]
FROM
[Design]
WHERE
[ParentDesignKey] IS…

Jonathan
- 601
- 9
- 26