Questions tagged [sql-server]
All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.
34,988 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
44
views
Sch-M/Sch-S deadlock
I was looking into some deadlock logs on my system today and saw one I didn't understand - deadlocks on Sch-M and Sch-S locks. The documentation said it had to do with schema definition changes, ...
6
votes
1
answer
957
views
Meaning of '#' suffix on SQL Server columns
While reading the docs here and there on SQL Server, I saw this request:
SELECT
ROW_NUMBER() OVER(ORDER BY name ASC) AS Row#,
name, recovery_model_desc
FROM sys.databases
WHERE database_id < ...
0
votes
0
answers
46
views
SQL Server 2022 Contained AGs and database mail
I have two SQL Server 2022 environments with Contained AG configured with a listener that the users are connecting too. All three have db mail configured identically. The two servers are able to ...
1
vote
1
answer
60
views
SQL Server deadlock due to clustered index scan (where clustered index seek is better) and unnecessary LCK_M_U
This is a pretty mundane transaction isolation scenario on a OLTP database (Microsoft SQL Server 2022).
Session A and Session B are running concurrently, and this works pretty much as you would expect....
3
votes
1
answer
86
views
Inoptimal Fill Factor on objects in sys schema
I have run the legendary sp_blitz on one of my servers, which has thrown up a warning about some fill factors that have been changed.
When I run the query from brentozar.com/go/fillfactor which ...
7
votes
1
answer
311
views
Alter table alter column does not work with user defined types
A user with db_datareader, db_datawriter, db_ddladmin and db_securityadmin roles can add columns with a user defined type, but cannot alter those.
For example: Lets say we create a user defined type ...
5
votes
1
answer
199
views
Do I need to run sp_refreshview and sp_refreshsqlmodule after changing column collations?
I look after a database for a vendor’s application that our system team uses to store passwords. This database is part of a three-node AlwaysOn Availability Group. The instance and database currently ...
0
votes
0
answers
35
views
Using Group Managed Service Account to login to SQL Server 2022
Help please!
I have a manual install of SQL 2022 built with the service running as the built in account. I now want to change the service to run as the group managed service account that I now have (i....
0
votes
2
answers
74
views
How to implement redundant databases with mutual synchronization in PostgreSQL or SQL Server
I am writing a program in Golang where I need to set up redundant databases. Here’s the requirement:
I have two databases that act as redundant to each other.
The application first tries to write data ...
-1
votes
0
answers
33
views
SSIS packages fail with unexpected termination status on SQL server 2022
My SQL Agent job, which runs SSIS packages, was working fine with the same user and setup earlier. But today, it failed with the status "Unexpected Termination" in SSMS/SSISDB. Nothing was ...
1
vote
1
answer
81
views
Matching TDE Certificates with different names across Always On Replica
I created a TDE certificate on the primary node. I then backed it up and copied the files to the secondary.
When I created the cert on the secondary from the backup files, I accidentally created it ...
0
votes
3
answers
72
views
While doing update, accessing records hangs report generation
While doing update, if some one tries to access the records from the same table, the report generation system hangs. Is this related to table lock? If enabled. Will row lock solve the issue? How to ...
5
votes
1
answer
105
views
Why does SQL Server Full Text Search (FTS) rank go down when match count goes up due to highly rare word
Given this query:
declare
@aboutPredicateOpt nvarchar(4000) =
N'IsAbout(
PICCO weight(0.1),
IC228 weight(0.1)
)';
select RowId, BrandId, ...
0
votes
0
answers
21
views
DEA 2.6 Startup Error – MEF GetExportedValue Prerequisite Import Failure
Installing Microsoft Database Experimentation Assistant (DEA) v2.6 on Server 2022 fails to start with:
System.InvalidOperationException: GetExportedValue cannot be called before prerequisite import '...
1
vote
1
answer
93
views
Rollback plan after upgrade from SQL Server 2016 Standard edition to SQL Server 2022 Enterprise edition
I'm planning to upgrade our SQL Server from 2016 Standard edition to 2022 Enterprise edition.
To prepare for potential issues, I want to have a rollback strategy in place. If, after the upgrade, our ...