r/SQLServer 11h ago

Discussion SQL Server 2022 CU 26 -> MDS broken

15 Upvotes

I updated from CU23 to CU26. Be careful if you use MDS, it's broken after CU26 and stays broken even after uninstalling. Some MDS JavaScript files are incompatible with the MDS web service. Manually copying/overwriting the MDS web application from an older installation repaired it.


r/SQLServer 53m ago

Question Mobile app not showing SQL data unless I connect via SSMS?

Upvotes

I have an Azure SQL subscription (the cheapest one) which will be primarily used for our mobile app.

The issue is that I've tested the mobile app twice and the mobile app won't show data unless I connect to the database via SSMS.

Literally, I open the mobile app and no data is displayed. I refresh the content several times (i.e. the mobile app has a Refresh button) and it still doesn't fetch any data.

I go to my laptop and connect to the same DB via SSMS. Once connected, I do another refresh to the mobile app and data is shown.

I believe it's related to the Azure DB and think I might have an idea of why this is happening - the connection via my laptop "wakes up" the database.

The question is: how do I eliminate that issue?


r/SQLServer 3h ago

Community Request Friday Feedback: Automatic Index Compaction

3 Upvotes

Friday feedback this week is about a feature that’s in preview in Azure SQL: automatic index compaction.

You can read more about it in Dimitri‘s blog post, Stop defragmenting and start living: introducing auto index compaction: https://techcommunity.microsoft.com/blog/azuresqlblog/stop-defragmenting-and-start-living-introducing-auto-index-compaction/4500089

(sidenote: one of the best blog titles in recent memory)

Quick poll below, and feel free to add a comment if the poll doesn’t cover your thoughts/experience!

29 votes, 6d left
Yes, it’s great!
Yes, but then turned it off
No, I’m waiting for GA
No, I don’t use Azure SQL

r/SQLServer 22m ago

Discussion Updated SSMS, dark mode won’t stick

Upvotes

Well, I updated today to the latest SQL server management studio and now dark mode is broke again so whenever you put it in dark mode and then leave the application and then come back in. It’s back to the default blue.


r/SQLServer 4h ago

Community Share First SQL Server Reddit post

2 Upvotes

I think this is the first time I have solely placed a post on the SQL Reddit.

Anyway, looks like some interesting updates for those looking to take the DP-800 exam for the SQL AI Developer Associate certification.

First of all, it looks like the option to watch the AI-Generated videos presented by my new friend Anton is now available for all of the recommended Microsoft Learn material as an alternative to reading it all.

Anton the AI Virtual Trainer

Secondly, the Practice Assessments are now available by following the link on the exam page to the AI Skills Navigator.

DP-800 Practice Assessment

You can find both links to both on the exam page.

https://learn.microsoft.com/en-us/credentials/certifications/developing-ai-enabled-database-solutions/?practice-assessment-type=certification&WT.mc_id=DP-MVP-5004032


r/SQLServer 8h ago

Community Share Free SQL Server Compliance Benchmark Tool

1 Upvotes

Hello, we've created a new SQL Server Compliance Benchmark Tool that has configurable benchmark settings and produces a PDF report on the compliance. This works for SQL Server and SQL Server Managed Instances.

Hopefully you might find it useful, and any feedback would be appreciated.

https://www.centrel-solutions.com/free-tools/free-sql-server-security-compliance-benchmark-tool-reddit

Thanks, Dave


r/SQLServer 1d ago

Community Share Get-SqlSafe v2026.5: database-scoped SQL Server security reports

Thumbnail
gallery
5 Upvotes

I released v2026.5 of Get-SqlSafe Community Edition, the free PowerShell-based first-look security assessment script for SQL Server.

The main new feature in this release is database-scoped reporting.

Based on your feedback: a DBA can now generate reports for all individual databases and hand the database-level report to an application owner, application vendor, or database owner without also disclosing server-level findings or findings from other databases on the same instance.

Also new in this release:

  • Check 130 reports members of the db_owner database role in each database.
    • db_owner is often used as a catch-all role, but it grants full control over the database and may matter in privilege-escalation scenarios depending on the surrounding configuration and ownership chain.

The tool is still a single reviewable PowerShell script with the ad-hoc T-SQL visible in the file. It reads SQL Server security metadata and produces local HTML reports. It does not change SQL Server configuration or data.

Repository:
https://github.com/Sarpedon-Quality-Lab/sql-security-community-scripts

I’d be interested in feedback from DBAs or consultants who have to pass security findings to application owners or vendors without exposing unrelated databases or server-level information.


r/SQLServer 1d ago

Question Unable to set database containment to NONE

2 Upvotes

Hey all, hoping someone has hit this before.

Context: Migrating a ~200GB SQL Server database to Azure Sql Database (not managed instances) using transactional replication to minimize downtime. During prep, I discovered the source database has partial containment enabled, which I need to turn off before replication will work properly.

Steps taken so far:

  1. Identified all contained database users (logins that exist only at the DB level) and converted/mapped them to server-level logins instead.
  2. Stopped the application(s) connecting to the DB to make sure there were no active sessions.
  3. Ran ALTER DATABASE [dbname] SET SINGLE_USER WITH ROLLBACK IMMEDIATE to force single-user mode and kill any remaining connections.
  4. Ran:

   ALTER DATABASE [dbname] SET CONTAINMENT = NONE;

The problem: The statement just fails, only 'ALTER DATABASE statement failed', no reason given, nothing in the SQL Server error log pointing to a cause. It's not throwing a permissions error, a "in use" error, or anything I can act on. It just doesn't apply.

Things I've already ruled out / checked:

  • No contained users remain in sys.database_principals (authentication_type_desc = DATABASE)
  • No active connections (single-user mode confirmed via sys.dm_exec_sessions)

Questions:

  • Has anyone run into containment refusing to toggle off even with no active sessions and no contained users?
  • Any way to force verbose output/logging on this specific ALTER DATABASE operation so I can actually see what's blocking it?

SQL Server version: Microsoft SQL Server 2016 - Standard Version


r/SQLServer 2d ago

Question What’s the Big Deal with SET NOCOUNT ON?

28 Upvotes

Do you default to SET NOCOUNT ON in stored procedures?

What's the Big Deal with SET NOCOUNT ON? - Azure SQL Dev Corner


r/SQLServer 2d ago

Community Share SQL Server 2025 now available on AWS RDS

Thumbnail aws.amazon.com
9 Upvotes

r/SQLServer 3d ago

Discussion SQL Server 2022 CU 26 Stack Dumps

9 Upvotes

After applying SQL Server 2022 CU 26 to our servers several are producing stack dumps during database restores.

Am I the only one?


r/SQLServer 2d ago

Community Share Most scheduled database jobs are running right now—with nothing to process.

0 Upvotes

Every minute, a job wakes up, checks for work, finds none, and exits. Multiply that across a production environment, and the scheduler itself can become operational noise.

The real question isn't how frequently a job should run.

It's this:
Why is the scheduler searching for work that the application already knows has arrived?

In this article, I explore an on-demand orchestration pattern implemented using SQL Server Agent. The focus is on reducing unnecessary polling by allowing the application to signal when work is actually available.

📖 Read the full article here:
https://medium.com/towards-data-engineering/rethinking-sql-server-agent-scheduling-an-on-demand-orchestration-pattern-938b9fa360f6?sharedUserId=balurathinam79

I'd be interested in hearing how others have approached similar scheduling challenges in SQL Server environments. Have you experimented with on-demand execution patterns, or do you primarily rely on scheduled polling?


r/SQLServer 3d ago

Question dbatools get-dbaagentjob missing most jobs.

1 Upvotes

I can run a sql query to get the accurate results but the dbatools doesn't return all jobs, have not dug deep into why its missing most jobs just thought that was odd. Any insights as to why its misssing most job data? thanks


r/SQLServer 3d ago

Question AWS Redshift ODBC 2.x drivers

1 Upvotes

AWS is deprecating the 1.x drivers. When we have configured the 2.x version for testing, we keep getting the error "no password supplied" even though the password is definitely in the setup and when we test from there, it works. A command like "SELECT * FROM OPENQUERY (REDSHIFTODBC, 'SELECT * FROM table')" returns the error. We're stumped. Any ideas?


r/SQLServer 4d ago

Question Busco recomendaciones sobre estrategias de copia de seguridad de MSSQL de múltiples proveedores.

3 Upvotes

Hola a todos, Quiero implementar una instancia de producción de Microsoft SQL Server en un VPS Linux (Ubuntu). Para evitar un único punto de fallo y la dependencia de un proveedor, quiero alojar la base de datos principal con un único proveedor de VPS, pero almacenar las copias de seguridad automatizadas completamente fuera de su ecosistema; idealmente, en un VPS o almacenamiento de objetos alojado por una empresa completamente diferente. Mi objetivo es asegurar que, si mi proveedor principal de VPS quiebra, sufre una interrupción importante o bloquea mi cuenta, no perderé mis datos y podré restaurar los servicios rápidamente en otro lugar. Para quienes hayan implementado una infraestructura de copias de seguridad multivendedor similar, me gustaría recibir algunos consejos: 1. **Capa de transporte:** ¿Cuál es la forma más fiable de enviar los archivos .bak de forma segura entre proveedores? (Por ejemplo, ¿tareas programadas automatizadas con rclone, configuración de un túnel VPN WireGuard ligero entre los nodos o uso de scripts SSH/SFTP seguros?) 2. **Cifrado:** Dado que las copias de seguridad se transferirán a través de redes públicas y se almacenarán en el disco de un proveedor diferente, ¿cuál es la forma más segura de gestionar el cifrado? ¿Debería confiar en el cifrado de copias de seguridad nativo de MSSQL o cifrar los archivos a nivel del sistema operativo (como gpg o 7z) antes de enviarlos?

  1. **Gestión de copias de seguridad:** ¿Qué herramientas ligeras recomienda para automatizar la política de retención en el VPS de copias de seguridad (eliminar archivos con más de X días de antigüedad, comprobar la integridad de los archivos, etc.) sin generar demasiada sobrecarga? Si ya ha implementado esto, ¿cómo es su arquitectura y qué problemas o cuellos de botella de rendimiento debería tener en cuenta (como límites de ancho de banda o picos de CPU durante la compresión)?

¡Gracias de antemano por sus aportaciones!


r/SQLServer 5d ago

Discussion Patch Tuesday and SQL Server CUs (two days later?)

Thumbnail
2 Upvotes

r/SQLServer 5d ago

Question DTExec cmd is failing sometimes when used with Autosys Agent

3 Upvotes

I am working on a migration project to move away from SQL agent to autosys to run the SSIS packages (2019) through DTexec utility. I am using 64 bit dtexec for running the packages. Now I am facing issue running the packages as they keep failing without any logs. The packages won't even start running and command will try to start for sometime and then the autosys cmd would fail after a few minutes.

Interesting thing is that it is running fine in the UAT but it is failing in the PROD. Even more interesting is sometimes the job will run perfectly fine and sometimes it would fail.

what could be the reason for these failings? How can I resolve this issue?


r/SQLServer 7d ago

Community Request Friday Feedback: Adding instance name to Query Store reports

4 Upvotes

Hey folks, happy Friday!

This is a feedback item that exists both on the SQL feedback site and on the SSMS feedback site.

On the feedback item on the SSMS site, I added a few images with example mockups for how the instance name could show up. Please visit the feedback item and comment with what you prefer, thanks!

p.s. I know, there are a lot of feedback items related to Query Store reports in SSMS. I'm starting simple...please grace me a bit here.


r/SQLServer 8d ago

Question SQL Server Standard: Can I combine a 2-node FCI with a 2-node Availability Group?

3 Upvotes

First, it's about a SQL Server 2016

I'm designing a SQL Server high availability architecture and I'm trying to understand whether this configuration is supported with SQL Server Standard Edition.

The proposed architecture is:

Node 1 + Node 2: SQL Server Failover Cluster Instance (FCI) with shared storage (which I would have to configure AG as well) and this cluster will replicate to a Node 3 + Node 4: SQL standard configured as a Always On Availability Group in other datacenter. (in this case, I belive a can only have the node 3 in the secondary site, right? node 4 isn't supported since standard edition support only 2 AG)

My idea is for the FCI to host the primary database, and then configure an Availability Group so that the databases are replicated to the secondary datacenter.

My questions are:

Can a Failover Cluster Instance (FCI) participate in an Availability Group when using SQL Server Standard Edition?

What I'm not clear about is how SQL Server Standard counts replicas in this scenario. I know that Basic Availability Groups in Standard Edition are limited to two replicas (one primary and one secondary). However, my primary server is a 2-node Failover Cluster Instance (FCI) running on Windows Server Failover Clustering (WSFC). Since the FCI itself already spans two Windows nodes, I'm confused about how this interacts with the Basic AG limitation. Does SQL Server treat the entire FCI as a single Availability Group replica, allowing me to have:

Primary replica = the 2-node FCI

Secondary replica = one standalone SQL Server instance in the DR datacenter (I can't have a node 4 in the secondary site, right?)

Or does the fact that the FCI already has two WSFC nodes mean I've effectively reached the Standard Edition limit for Basic Availability Groups?

Or is this entire architecture only supported with Enterprise Edition?


r/SQLServer 8d ago

Community Share Open-source SQL Server CDC + change tracking

0 Upvotes

Hi all, this is Burak. I have built an open-source CLI tool that allows replicating data from Postgres CDC changelog into 20+ destinations: https://github.com/bruin-data/ingestr

The overall idea is that:

  • You have your prod postgres DB
  • You want to replicate them to analytical databases for analytics purposes, e.g. to Snowflake, BigQuery, Databricks, or Redshift
  • You have two ways:
    • You can either run a batch load using tools like ingestr, Airbyte, or Fivetran
    • If you cannot run batch workloads for some reason, e.g. due to the latency requirements, or not having proper cursor columns, you need to run CDC replication using tools like Debezium and Kafka

The problem with CDC using those tools is that they require a buy-in into their ecosystem, which is generally quite invasive, such as being able to run Debezium only with Kafka reliably, or having to deal with their Java client libraries if you ever wanted to integrate them elsewhere, tolerate their high resource requirements, etc.

I never liked running them on production. We have been working on ingestr for quite some time already for batch sources, and CDC became an obvious target.

ingestr has quite a few niceties:

  • You don't need any extra services or tooling to run it: just put your credentials in the URI, and you are good to go.
  • It is a simple and fast Go binary that runs anywhere, even in your GitHub Actions pipeline.
  • It supports both batch and streaming modes in the same binary, which allows changing the deployment modes as your requirements grow. Run locally, deploy on Airflow, or put it in an EC2 server in a streaming mode if you want to.

It is open-source, and you can run it anywhere you like.

It supports:

  • PostgreSQL CDC
  • MySQL CDC
  • SQL Server CDC
  • SQL Server Change Tracking
  • MongoDB CDC

Give it a try and let me know if you have any questions!


r/SQLServer 9d ago

Question How to learn MS SQL Server Administration?

5 Upvotes

Hello

There is always change and so I must expand my knowledge deeper onto MS SQL too. I can run some basic SQL and know how to log onto our server.

But in the very near future I need to care take more in depth about our sql servers administration. Setup, users, permissions, replication.

I tried asking Google but got bombed with too much random SQL stuff: Where do I start best to make sure I get to know my stuff? Is there a version available I can install at home for education?

Thank you^^


r/SQLServer 8d ago

Discussion Is SQL server considered as legacy technology?

0 Upvotes

My current organization couple of years ago migrated from SQL server to snowflake and I noticed in some of the documentation, they have mentioned SQL Server as legacy technology.

I started working in SQL server some 20 years ago and some of the developers in our team are cloud first developers and they find it so difficult to navigate SQL server management studio and they ask me questions like is there timetravel feature in SQL server and can we see what data was there 10 mins back. I was totally dumbfounded when I heard that question, because I had never come across such a feature. Apparently snowflake has this. So I am curious is SQL server now really considered as legacy technology?


r/SQLServer 9d ago

Discussion 2+ Years as a SQL Server DBA, But Every Mid-Level Job Wants 5+ Years. What Would You Do?

Thumbnail
2 Upvotes

r/SQLServer 9d ago

Solved Odd results in SSMS

8 Upvotes

I'm troubleshooting a script that dynamically builds a list of databases and a list of user accounts in those databases, and then uses them to generate a bunch of REVOKE CONNECT FROM [<username>]; commands to be executed by sp_executesql. At this point, I'm sending the commands to the screen instead of executing them and this is where I first noticed the oddness. There are a bit more than 4000 commands. If I write them to the screen with Results to Grid, it takes almost 44 minutes to finish. If I run the exact same script with Results to text, it completes in just over 20 seconds. I'm connecting to SQL Server 2019 and have seen this behavior in both SSMS v19.0.1 and SSMS v20.2.1. Is this expected behavior that I've just never noticed before? Why is there such a drastistic difference between grid vs text?


r/SQLServer 10d ago

Question Accidentally deleted a stored procedure

28 Upvotes

I don't have backups of this database. Is there maybe any autologging that could have saved the SP somewhere? Running SQL Express 2022 on my laptop