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

Select query not returning results when encased in a transaction

I am building a test case that would tell me the number of records loaded to my final fact table. The steps involved are, Declare variables. Load dimension dummy data. load transaction data. Execute the procedure that loads the transactions to…
KahLeon
  • 29
  • 1
  • 5
1
vote
2 answers

Unable to use ALIASES in subquery inside SQL Select clause

I'm trying to use an alias inside a subquery in a select statement like the one below: SELECT InvoiceId, InvoiceTotal, (SELECT AVG(InvoiceTotal) FROM Invoices) AS InvoiceAverage, InvoiceTotal - (SELECT…
Kenzo
  • 1,767
  • 8
  • 30
  • 53
1
vote
0 answers

How to get rid of SQL Profiler exception 208 using table valued parameter (TVP)

I did search for exception 208 (invalid object name) identified by SQL Profiler and found many hints regarding "Deferred Name Resolution". Nevertheless I still did not find an asnwer related to TVP (table valued parameter) and SQL Server 2019. I´m…
SQL Tom
  • 11
  • 1
1
vote
0 answers

SQL Statement help : combine data from multiple tables

I have 4 tables: transactions : where the match of buy orders and sell orders in order to have a transaction transaction_id (PK)| buy_order_id | sell_order_id | transaction_date |…
AmyB
  • 25
  • 7
1
vote
2 answers

SSRS 2019 DNS Entries Give 404 when trying to run reports

I have set up a new SSRS 2019 site with HTTPS & DNS. When I am connecting to the site through the https://ComputerFQDN/Reports then everything works just fine. When I try to connect through DNS to https://DNSName/Reports then the main page comes…
1
vote
1 answer

Retrieve the count of Sale records based on 2 week bracket from the recent verification date

CREATE TABLE [dbo].[Sale]( [ID] [int] NOT NULL, [SaleDate] [date] NOT NULL, [CustomerRef] [varchar](20) NOT NULL ) ON [PRIMARY] CREATE TABLE [dbo].[Verification]( [CustomerRef] [varchar](20) NOT NULL, [VerificationDate] [date]…
variable
  • 8,262
  • 9
  • 95
  • 215
1
vote
1 answer

Can I create a custom role in Sql Server Reporting Services (SSRS) (2019)?

I would like to create a custom role to mimic 'Browser', but not give the user access to subscribe to reports. I noticed that there is a 'Roles' table in the ReportServer database that lists out the current roles, along with a TaskMask and…
Rob C
  • 150
  • 2
  • 14
1
vote
1 answer

CAST to TIME in select query is taking long time to execute

declare @fromLocalTime TIME = '06:00:00', @toLocalTime TIME = '06:59:59', @runDate AS DATETIME2 SET @runDate = GETUTCDATE() DECLARE @notificationCreatedFromDate AS DATETIME2 = (SELECT DATEADD(day, -1, @runDate)) SELECT…
Shardul
  • 309
  • 1
  • 3
  • 17
1
vote
1 answer

Group a dates by range

I'm struggling with a T-SQL query to partitions/group a dates table into periods. A new period is defined as from 16th of a month to 15th the next month. So if the table looks like…
Agneum
  • 727
  • 7
  • 23
1
vote
0 answers

SQL Server 2019: master db -- How to recreate ##MS_SchemaSigningCertificate in 2048 bits. VA1223

The new SQL Vulnerability assessments are flagging our database with "VA1223: Certificate keys should use at least 2048 bits" (FedRAMP…
jpwalters
  • 11
  • 2
1
vote
2 answers

Extract data from XML document using t-sql

I have been trying to extract data from the following xml doc using t-sql on sql server 2019. XML:
Jack Jones
  • 335
  • 1
  • 2
  • 8
1
vote
1 answer

@@DATEFIRST not returning results as described in the docs

I have read this documentation So I tried this experiment declare @t table (test date) insert into @t values ('20220404'), ('20220405'),('20220406'),('20220407'),('20220408'),('20220409'),('20220410') select datename(weekday, test), …
GuidoG
  • 11,359
  • 6
  • 44
  • 79
1
vote
0 answers

On Amazon SQL Server RDS, how can we identify all apps that are connecting using the direct server name and not the alias?

We are soon to migrate our back-end from an Amazon SQL Server RDS to another identically set up RDS server. We intend that our systems will not be interrupted because they connect using an AWS alias that we will swap to point to the new RDS…
1
vote
1 answer

Query returns different result from C# then from SSMS

I have this weird problem that I cannot explain When I run a certain query from a C# application, it returns a different result then when I run it in SSMS, but not when I use parameters The command is this select dbo.fnGetPlaceID('6025', null,…
GuidoG
  • 11,359
  • 6
  • 44
  • 79
1
vote
1 answer

SQL concatenating columns values depending on another column and counting ocurrences with GROUP BY and also including CASE clauses

I'm trying to concatenate the values Bs of a column depending on the value A of another column all this while counting the ocurrences of said value A, finally the selection of value A depends on the result of a CASE clause of column C and D If i…
SaltyCode
  • 67
  • 1
  • 2
  • 11