Questions tagged [sql-server-2019]

Use this tag for questions specific to the 2019 version of Microsoft's SQL Server.

New Features Of SQL Server 2019

  1. Intelligent Query Processing Enhancements enter image description here
  2. Accelerated Database Recovery (ADR) enter image description here
  3. AlwaysEncrypted With Secure Enclaves enter image description here
  4. Memory-Optimized Tempdb Metadata
  5. Query Store Custom Capture Policies
  6. Verbose Truncation Warnings
  7. Resumable Index Build
  8. Data Virtualization With Polybase enter image description here
  9. Last Actual Execution Plan DMF
  10. Multiple Internal Performance Improvements

Reference : What's new in SQL Server 2019 (15.x)

977 questions
1
vote
2 answers

SQL How to order by date after a convertion to char?

I have a datetime column from which I want to show the dates with format "dd/mm/yyyy" I tried with Select distinct CONVERT(VARCHAR(10), [DateAndTime], 103) as [DateAndTime] from dbo.Prod order by dbo.Prod.[DateAndTime] but it gives me the…
1
vote
0 answers

Save SSRS 2019 report as PDF from SSIS script - authentication issue?

I am trying to migrate a very old SQL Server environment (2005!) to 2019. In our old environment we have an SSIS package that includes a VB script task to generate PDF copies of a number of reports and save them to a specified location. When I try…
Skippy
  • 1,595
  • 1
  • 9
  • 13
1
vote
0 answers

Do SQL Server temp tables live in memory even after the script finishes executing?

If I have a stored procedure that users are running constantly that creates temp tables and don't clear these temp tables at the end of the stored procedure, do these temp tables continue to exist and use up memory after the execution of the SP? I…
1
vote
1 answer

Does synonym uses the indexes of source table in SQL Server?

I have two databases D1 and D2. I have created a synonym T1 in D2 which refer to a table T1 from the D1 database. Now if I query using the T1 synonym in the D2 table, will it use the index of the T1 table from the D1 database? Currently, I am in a…
1
vote
0 answers

Using VB6 with ADO to access a MS SQLServer 2019 linked server

Note that both databases are MS SQL Server. The SELECT works fine and the code doesn't break until it gets to ADODB.Recordset.Update. The SQL account has all of the necessary permissions. The table [NASMSPAINT].[Ignition].[dbo].[booth_Styles] is a…
Kevin
  • 11
  • 2
1
vote
0 answers

SSIS package deployment failure after SQL server default TCP port change + original package execution pending

I have a case that SQL server is running remotely and recently the SQL server TCP port is changed from 1433 to 61433. After service reboot, I can connect to the server by (server name, port number) but cannot deploy packages from VS2019 to the…
tnsql
  • 11
  • 2
1
vote
1 answer

Assigning multiple variables in one select

I have the following query: SELECT ROW_NUMBER() OVER(ORDER BY A.Price) AS R, A.Price FROM TableA A INNER JOIN TableB B ON A.ID = B.ID INNER JOIN TableC C ON C.Code = A.Code WHERE C.Type = 125 AND A.Desc = 10000038 …
niksirat
  • 217
  • 2
  • 8
1
vote
1 answer

FOR JSON - How can I create JSON array output without keys?

I'm playing around with the FOR JSON features in SQL Server 2019, and I'm struggling with how to use that feature to create a JSON list without keys... so like just a straight-up list of values. For example, say I have this SQL: declare @years table…
c_tothe_k
  • 61
  • 7
1
vote
0 answers

PageLatch_EX and PageLatch_SH on non-clustered index

We have two tables which receive 1 million+ insertions per minute. This table is heavily indexed, which also can’t be removed to support business requirements. Due to such high volume of insertions, we are seeing PAGELATCH_EX and PAGELATCH_SH. These…
UVData
  • 459
  • 2
  • 6
  • 13
1
vote
1 answer

Showing converted Base64 (from hex) in an existing SQL Server 2019 view

I do voluntary work at an animal shelter. We have an application which uses a SQL Server 2019 database. I have created a view that includes a varbinary(max) column. The value in this column is a picture, stored in hexadecimal-format. I would like to…
MarcoC
  • 21
  • 3
1
vote
1 answer

Use relative column name value to calculate DATE value in SQL

I have a table that has some peculiar data arrangements where there are 28-31 columns corresponding with the day of the month for a series of unique IDs. What I'm trying to do is bring that into a more feasible format with actual date values. My…
1
vote
1 answer

REPLACE string with SUBSTRING function

Given input data: Col1 --------------------------------------- '-'::"varchar" COLLATE "default" '-1'::integer '0'::smallint …
MAK
  • 6,824
  • 25
  • 74
  • 131
1
vote
0 answers

Should I explicitly list partitioning column as part of the index key or it's enough to specify it in the ON clause with partition schema?

I have SQL Server 2019 where I want to partition one of my tables. Let's say we have a simple table like so: IF OBJECT_ID('dbo.t') IS NOT NULL DROP TABLE t; CREATE TABLE t ( PKID INT NOT NULL, PeriodId INT NOT NULL, ColA…
SQL_Guy
  • 333
  • 4
  • 15
1
vote
1 answer

How to ignore duplicate status rows in events table

My source events table looks like this: The result set I need should not include the duplicated "OPEN" values (4, 5), and if possible, return the first occurrence only. The closest I've been able to get is to group them by looking at answers…
spikej
  • 136
  • 2
  • 9
1
vote
1 answer

Identifiy all rows that make up a partion

I am using SQL Server 2019 and I need to process the latest row from a group of rows. However, I need to mark the other rows in that group so I know they where evaluated when the latest row was processed. The actual problem is complicated, with…
Don Chambers
  • 3,798
  • 9
  • 33
  • 74