Questions tagged [sql-server-2019]

SQL Server 2019 (major build version 15.00.xxxx). Please also tag sql-server.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Rolling Upgrade Win2012R2/SQL2012 Availability Group to Win2019/SQL2019

To do a rolling upgrade of an Availability Group from Windows 2012R2, SQL 2012 to Windows 2019, SQL 2019 do I have to have an intermediary set of servers on Windows 2016? Based on the documentation ...
0
votes
0answers
19 views

SQL Redistribution Logic

I have modified the query based on the requirements of this group. There is a create and insert table query at the bottom of this post to help create the required table. The expected result is also ...
0
votes
0answers
15 views

"Update Statistics" operations are dramatically slower after SQL Server Upgrade from 2016 to 2019

We recently performed an in-place upgrade from SQL Server 2016 Enterprise to SQL Server 2019 Enterprise. We are finding that some of our update statistics operations are running much slower especially ...
0
votes
0answers
23 views

Delete the database without single-use it [duplicate]

I get an error when I try to delete a database with the following command. DROP DATABASE IF EXISTS NewDB Error: Msg 3702, Level 16, State 4, Line 1 Cannot drop database "NewDB" because it ...
5
votes
1answer
171 views

Temporal Table: Multiple inserts on each update?

Actual Question: Is there anything in sql 2019 server (besides a trigger) that can cause multiple rows to be inserted in the history table when a single row is updated in the temporal table? Backgound:...
2
votes
1answer
16 views

Missing Tables from a Backup and Restore (Migration) on SQL Server

I'm trying to copy the structure and contents of a small database on an SQL Server instance at work to an instance on my home computer. It seems like this should be a simple, two-minute operation, ...
0
votes
1answer
78 views

Reducing memory grant waits in development environment

I've got a query which waits a long time for memory grants, even though it's the only query running at the time. The query plan is at https://www.brentozar.com/pastetheplan/?id=rkNF4LF6K I cannot ...
1
vote
1answer
74 views

Why is a table scan for small data so slow [duplicate]

I've got a table with 200k rows which lives on an SSD. I'm doing a lookup using a comparison on varchar field where ~20% of entries are null, otherwise 10 numeric characters with random distribution. ...
-4
votes
0answers
34 views

MSSMS SQL I am trying to create function which returns total number of people from 2 tablets [closed]

Hi I am creating database and I am trying to create function which returns total number of people from 2 tablets. Table 1 CREATE TABLE Zamestnanci ( id_Zamestnanca int not null, Meno varchar(50) null, ...
0
votes
1answer
48 views

sp_Blitz shows "write_conflict" from In-memory OLTP

My team came across a In-Memory OLTP (Hekaton) transaction issue with several of our machines showing that there were a varying number of write conflicts per machine. We do have Memory-Optimized ...
5
votes
1answer
162 views

Door Number 1, 2, or 3?...Security change, bug, or failed upgrade with an in-place upgrade from SQL Server 2016 to SQL Server 2019?

What I Did: Recently I tested doing an in-place upgrade on ServerA, a development server that was running SQL Server 2016 (SP 2 CU17) Standard Edition to SQL Server 2019 Standard Edition. (I know this ...
0
votes
1answer
30 views

Is there a way to disable database encryption before initial encryption completes?

I am able to start, suspend, and resume encryption. Once started I can't find a way to disable encryption until initial encryption completes. Is there a way to accomplish that? For example... -- ...
-1
votes
0answers
32 views

Insert blocked but not being reported as blocked

We came across an interesting scenario yesterday and I'm trying to figure out if there was an easier way to diagnose and remediate the issue. We are running SQL Server 2019 CU 12 Enterprise edition. ...
7
votes
1answer
123 views

Why does this TVF throw error 9820 with GETDATE() as an input parameter?

I am testing on SQL Server 2019 CU14. Consider the following table-valued function created against a SQL Server database with compatibility level 130 or 140: -- requires database compat 130 or 140 to ...
5
votes
2answers
182 views

Computing the set difference of tables of intervals

I often run into the following problem. I have two tables of intervals. They are bounded by dates (with no time component). Within each table the intervals do not overlap. StartTs EndTs 2015-01-03 ...
0
votes
1answer
26 views

SSIS detecting sequential duplicates

SSIS/Sql Server/Visual Studio 2019. I've got a big csv file that has a lot of iffy data. One thing I wanted to do was at least try to recognize sequential lines that are the same and kick the ...
1
vote
1answer
40 views

SSIS csv import going slowly

I'm new to SSIS and I'm starting with 2019. I'm getting a csv with 330 million rows and some of the data is dubious. Some rows I can identify as bad based on a single column value. Other issues I ...
-1
votes
1answer
70 views

Fresh SQL Server 2019 install, a simple select takes a minute to run each time [closed]

We recently performed a fresh install of SQL Server 2019 on an existing EC2 in AWS, once that we used for our last installation of SQL Server 2019. We then did a restore of some databases via backups (...
1
vote
1answer
61 views

json_modify on condition

As in my previous question, I am working on migrating my XML based procedures to JSON ones. My newest struggle is with json_modify I'm used to using .modify with XPATH to be able to modify XMLs on the ...
0
votes
0answers
57 views

Weird utf-8 encoded column issue

We're looking to upgrade our old sql servers so I got a test db on 2019 and started playing with some of the new features. I loaded up some tables with SSIS packages from a csv file, then I changed ...
7
votes
2answers
118 views

Intellisense automatically disabling with "WITH Inline = OFF"?

In my SSMS (I'm using 18.10) project, I've been frustrated by the fact that Intellisense is not functioning in my files. I had conjectured that it was due to the size of the codebase, but in fact, I ...
0
votes
1answer
32 views

Table partitioning on an existing table and using different filegroups

I have an existing table on the primary filegroup, which I want to partition. The partition key is on year, which is a calculated column. I want to partition the table in such a way that in the end ...
0
votes
1answer
33 views

SQL Server 2019 - Recovery after reboot (for windows updates)

lately one of our SQL server 2019 database has been going 'In recovery' after a restart. The databases aren't particularly large. The server has 8 databases of ~17GB per database. The database itself ...
6
votes
1answer
173 views

Can a full DBCC CHECKDB operation be safely offloaded to an AG secondary server?

Can a full DBCC CHECKDB operation be safely offloaded to an AG secondary server? Would be nice to not have this overhead on the primary server. SQL2019
3
votes
5answers
125 views

Actual and Estimated rows differ greatly

The full Actual plan is here. Prior to executing the plan (because I'm debugging a poorly functioning plan) I have this block of variable assignments: DECLARE @Days INT = 180 DECLARE @DateRangeFrom ...
0
votes
0answers
19 views

SQL Server 2019 CU11 Express - user DBs started up 45 mins after server restart - when scheduled backups connected to them - not auto_close issue

This happened yesterday after server restart. The system DBs started at 9:44AM - user DBs started at 10:35AM. (Starting up database: OraDocumentum) User DBs started because Netbackup tried to ...
4
votes
1answer
107 views

SQL Server Multi-Instance IP Configuration - Service Doesn't Start

I have run into an issue whilst configuring a multi-instance SQL Server when assigning a specific IP address to the fist instance. Dedicated IP Setup The steps I perform to configure a single instance ...
11
votes
3answers
390 views

MERGE into a view with INSTEAD OF triggers

I have a view with instead of triggers and I'm trying to use it with EF Core, which tries to batch inserts together in a form of merge statement. Here's my table and view: create table tbl (id ...
1
vote
1answer
56 views

Enumerating JSON arrays with OPENJSON

I've been working on converting some of my XML based stored procedures to JSON, but I'm running into an issue. With OPENXML, I had access to mp:id, so when I was parsing an XML, I could access an ...
2
votes
3answers
88 views

How to detect tempdb usage?

On-premise, we are using SQL Server 2019 Standard Edition under READ_COMMITTED isolation level and I want to test how one database with perform with READ_COMMITTED_SNAPSHOT (the Azure default). The ...
4
votes
1answer
169 views

SQL 2019 CU13 breaks Cluster_nodename

With total disregard to my paranoia about this unlucky number we installed CU 13 for SQL 2019 in one of our environments (in defense of the number 13 I have the same issue with 14). The progression ...
1
vote
2answers
48 views

What is the performance overhead of snapshot replication vs transactional replication on the production server?

Requirements: I want to setup a one-way replication for 4 tables from the database on this server into a database on another server for the purpose of reporting. The total number of rows currently in ...
0
votes
2answers
80 views

AlwaysOn Availablity Groups and database count limits

Update: Basic answer: I asked for something that isn't part of the design of AOAG. Which in my eyes makes this a 'not a good question to ask'. Unless this offends someone, I'll keep it here in the odd ...
1
vote
0answers
52 views

Why do some SQL Server databases go into a "Recovery Pending" state after shutting down / restarting on Linux?

I built a secondary PC from old parts as a server for SQL Server databases and I went with Linux/Ubuntu 20.04 because it's free. I knew it would not be easy to set this up (I'm rather a Windows user) ...
0
votes
1answer
61 views

Efficient where clause on field that has json

I have the following query that i would like to add a where clause on a json field, Below is my json I filter out based on a list of categories, in below example, there is 3 categories and if i pass ...
2
votes
1answer
149 views

Performance difference between environments when adding column

We have 2 exact same Database Environments. The second environment contains a copy of the production database and hosts approx 11M records in the Invoice table. The goal of this environment is used to ...
1
vote
1answer
116 views

SQL server restore from backup files on azure storage blob container (using SAS token)

I have set up a SAS token in an azure blob storage container. It is currently valid, as demonstrated by the fact that this command in windows cmd.exe works: azcopy list "https://<...
12
votes
1answer
394 views

Does SQL Server 2019 have task scheduling differences between enterprise and standard editions?

In How It Works: SQL Server 2012 Database Engine Task Scheduling, Bob Dorr explains some of the changes for worker scheduler assignment in SQL Server 2012. He mentions that some of the improvements ...
1
vote
0answers
26 views

Client to debug SQL stored procedure in Mac

I recently switched to Mac from Windows. I've started with Azure Data studio and VSCode. Is there a way to debug MS SQL stored procedure in Azure Data Studio? When I say debugging, I expect being able ...
0
votes
0answers
56 views

Excessive TempDB Usage When Using Pivot + Temp Tables

I have a stored procedure that is acting quite strangely, it basically works in this way: --Populate #tmpActualsVertical with data(in this example 84,652,788 rows) SELECT ...
1
vote
2answers
32 views

Hourly Transaction Log job fails when DB is deleted or restored

When ever we delete a DB or backup and restore a DB, we get email alert that our hourly transaction log has failed (log is taken every 30 minutes). Every log after fails, to fix the issue we have to ...
0
votes
1answer
37 views

SQL Server 2019 perform volume maintenance enabled during installation but not visible in local policies

I played around with a new SQL Server 2019 Developer and noticed something strange. I enabled Perform volume maintenance tasks during installation and setup the engine to use a domain account, but ...
1
vote
1answer
90 views

SQL Server 2019 upgrade from Enterprise Evaluation > Developer

Someone installed Enterprise Evaluation on our development server which is about to expire. I wanted to do edition upgrade through the Installation Center but I got an error: Rule "SQL Server ...
0
votes
0answers
31 views

sqlos.process_killed and sqlserver.lock_released Extended events not firing on SQL 2019 Enterprise

I have the following extended event sessions configured (among others). It seems that all events fire except these two. In the second session, the "lock_acquired" fires just fine, but the &...
0
votes
0answers
39 views

UPDATE on a clustered COLUMNSTORE table with 150 columns and 30 mln records just stuck

I have a table TABLE_A which is having 150 columns (with 5 lob type) and 30 millions. User were facing read performance issue, so I created CLUSTERED COLUMNSTORE on the table. After I converted the ...
0
votes
0answers
20 views

Error message when Selecting Replication | Distribution Configuration

We have a SQL Server 19 installation configured for Failover Cluster Instance. I have been asked to setup replication between two databases on this server. When following the Microsoft documentation ...
1
vote
1answer
66 views

Handle datetime checks during SQL Server day light savings

We have a logging table that has entry added every minute (log_date field in the table is logged in UTC, the server local time is in PST) and we have a condition that monitors and alerts if there is ...
0
votes
2answers
44 views

Sql Server Disk I/O Troughput In Performance monitor

i use sql server 2019 and trace flag 1117(Grow All Files in a FileGroup Equally) is on in my DataBase. I need to consider the correct number of data files for primary file group according to my system ...
0
votes
0answers
32 views

What are the steps to add myself (domain admin) as a sysadmin login given that I presently have no access to the sql server? [duplicate]

I am a domain admin, and can connect to the SQL server machine. However, I do not have any permission on the sql server (login), so cannot connect to the SQL server via management studio. What are the ...
0
votes
0answers
67 views

The replication agent encountered a failure

I have created a new merge replication. I am facing this issue: When I go to ​start the 'View Agent Snapshot Status', it shows an error: I clicked start but still got the same error. I have viewed at ...

1
2 3 4 5
9