Questions tagged [sql-server-2022]
SQL Server 2022 (major build version 16.00.xxxx). Please also tag sql-server.
255 questions
0
votes
1
answer
22
views
After recovering from session timeout expiry, at what point does the primary start waiting on synchronous replicas to harden?
The documentation tells us what happens when session timeout for a synchronous Availability Group replica expires
"Even if a disconnected replica is configured for synchronous-commit mode, ...
0
votes
0
answers
32
views
Service Broker Messages Sent Directly To Target Queue
I am trying to set up queues within the same database (on the same server instance). I would like a ProcessStart queue and a ProcessEnd queue. The ProcessStart queue will receive messages with a set ...
2
votes
1
answer
378
views
Do canary tables make sense for Availability Groups?
For all HA or DR solutions in SQL Server, I have heard that it is smart to have a table with a timestamp column in each database and to have an Agent Job run every minute to update that timestamp with ...
4
votes
1
answer
135
views
How can I tell which tables, indexes, or pages do not have checksums?
This time last year, I set the page_verify database option to checksum on a very old and very large database. We do weekly index maintenance, so I hope that most of the database's pages have been ...
3
votes
1
answer
78
views
What is the maintenance on the index caused by insert, update, or delete operations?
Follow up question for this answer regarding the excerpt of the sys.dm_db_index_usage_stats doc:
The user_updates column is a counter of maintenance on the index
caused by insert, update, or delete ...
4
votes
2
answers
374
views
@@SERVERNAME Consistency in 3 node SQL Availability Group
We have a 3 node availability group running on SQL 2022.
The application which has its databases hosted on the AG queries @@SERVERNAME as part of licensing checks. If @@SERVERNAME doesn't match what ...
0
votes
0
answers
34
views
Retrospectively applying data retention to temporal tables
I've been asked to look at trimming the amount of change information that we're currently storing in a temporal table. The background to this is:
When the organisation that I work for initially ...
4
votes
2
answers
575
views
Performance tanks after small change in search date predicate
Can anyone help me understand what's happening here....
I'm trying to get consistent performance from a query being called from a third-party application. Changing the query itself isn't an option. ...
-1
votes
1
answer
57
views
After a failover to a DR region, the becomes "reverting/in Recovery" in the primary node
we have a 10+TB database. Whenever we failover it, the databases becomes with a session running a null command, with a HADR_DB_COMMAND wait_type.
I believe this is related to a rollback or something? ...
1
vote
1
answer
139
views
What does trace flag 11024 do?
Context
I have been experimenting with incremental statistics a lot. I do not know of any online resource about them that I have not read. Despite all of this, I just don't understand what trace flag ...
1
vote
0
answers
83
views
Under what circumstances will a memory optimized table variable with a hash index outperform other temporary tabular structures?
Context
Aside from victims of latch contention, everybody gave up on memory-optimized table variables pretty quickly. Probably around the time they realised that they still don't have statistics. Yet, ...
2
votes
1
answer
90
views
Upgrading SQL Server 2008 SP3 to SQL Server 2022 Best Upgrade Path and Licensing Questions
I have a requirement to upgrade several SQL Server 2008 SP3 databases to a new environment on new servers running SQL Server 2022. As per Microsoft’s documentation, SQL Server 2008 cannot be upgraded ...
0
votes
0
answers
85
views
Temp Table Management in Explicit Transactions and CATCH blocks
Example code below populates a PhoneNumber table and associates those PhoneNumberId's with an OrderNumber.
As written I am getting the error message:
The current transaction cannot be committed and ...
0
votes
1
answer
119
views
How does a join without any predicates estimate fewer rows than what go into it?
Consider the following script on the 10 GB StackOverflow2010 database. Be warned that it clears the plan cache.
IF NOT EXISTS (SELECT * FROM sys.types WHERE is_table_type = 1 AND name = 'ExampleTvp')
...
7
votes
2
answers
228
views
STRING_SPLIT - issue with NCHAR(769) and SQL_Latin1_General_CP1_CI_AS
In database
on SQL Server 2022 Standard Edition (CU19)
with default collation SQL_Latin1_General_CP1_CI_AS
I am splitting CHAR(31) separated values using STRING_SPLIT. I have an issue when the ...