r/SQLServer • u/BeTriCH_CZ • Feb 13 '26
Question SQL Server 2025 issue with higher number of databases
Hello,
How many databases are you running on new SQL Server 2025?
We are running many projects and small internal services and we use separate MSSQL database for each one. Currently we have several servers running SQL Server 2022 Express each with around 3,000 databases. Everything runs smoothly without any issues.
Databases are relatively small, most are between 10-100 MB and some are up to 1GB. Performance is good, and we have not experienced any problems.
However when we tried same setup on SQL Server 2025 Express we encountered serious issues. Once we exceed approximately 600 databases, server starts freezing and becomes very slow. Listing databases in SSMS is extremely slow. After restarting we cannot re-connect to SQL Server instance long time and sometimes MSSQL service becomes unresponsive or fails to start properly. No explanatory error in ERRORLOG.
We thought this might be new limitation in Express edition. However we tested SQL Server 2025 Standard as well and observed same behavior. We also installed latest Cumulative Update but issue persists.
When we reduce number of databases to below 500, server becomes stable again and runs without issues.
I also tried tuning various SQL Server settings but this did not resolve this strange problem.
Is anyone successfully running higher number of databases on SQL Server 2025 Express?
UPDATE:
Definitely BUG in SQL Server 2025 when creating more than 650 databases.
Same behavior was observed and tested on Express / Standard / Enterprise editions:
https://www.reddit.com/r/SQLServer/comments/1r4018z/comment/o5agaak/
•
u/AutoModerator Feb 14 '26
After your question has been solved /u/BeTriCH_CZ, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
26
u/VladDBA Microsoft MVP Feb 13 '26 edited Feb 13 '26
Since SQL Server 2025 is fairly fresh, it might be a bug that has not yet been addressed.
I'd recommend making MS aware of this.
The restart scenario specifically sounds like SQL Server 2025 is having a hard time bringing that many databases online. You might want to check if Event Viewer has any relevant entries during that timeframe.
That being said, I can't say I've ever expected to read the following sentence:
18
u/DrGraffix Feb 13 '26
Sql express with 3000 databases. That’s……cute.
4
u/MisterFoodUSA Feb 14 '26
Having the exact same experience. We set up a lab POC SQL 2025 Standard Developer Edition box (8 vCPU 64GB RAM) with NVMe / SSD storage running Windows Server 2025 DataCenter. Initial install was absolutely fine. Started load testing by doing batches of small databases (4MB each, 16MB logs) at 150 databases or so at a time, sequentially, one database at a time. The first three batches restored smoothly and quickly without issue., landing us at around 475 databases. Started the restoring of the 4th batch of 150 databases and a minute into this restore batch, everything started grinding to a halt and then we couldn't even connect to the instance except via a DAC session. Restore SPID's were showing massive waits on ASYNC_IO_COMPLETION and BACKUPTHREAD despite ZERO disk activity on the VM (Azure) and no issues with the Azure VM host either. I repeated this test three times with a freshly rebuilt VM / OS / SQL install on each occasion and the exact same issue pattern occurred at exactly the same time. We have a couple of other lab SQL 2025 servers which both have around 2-300 databases on them and they are working just fine without issues. We have already engaged Microsoft on this with an active support case and even their SQL engineer was like "oh wow, this looks like a SQL 2025 issue" but wouldn't say anything beyond that. I will post updates next week when I have more movement on the support case.
2
u/dbrownems Microsoft Employee Feb 14 '26
Consider using multiple VMs or even multiple instances. There are severe per-instance CPU and Memory limits on Express Edition.
9
u/dodexahedron 1 Feb 14 '26 edited Feb 14 '26
You're probably just exceeding artificial memory limits of express.
Figures here are per instance of the db engine except for database size, which is per db.
There's a minimum amount thats gonna be allocated just by attaching the db.
You most likely just need more servers, more instances,
or to buy Standard edition.Also... 3000??
I'm sure it's possibly allowed by the letter of the license, but definitely not what was intended by it. 😆
This feels like the MSSQL version of extreme couponing.
5
u/bobwardms Microsoft Employee Feb 16 '26
We are looking into this
4
u/MisterFoodUSA Feb 18 '26
UPDATE: we just had a reply from Microsoft about this issue and were advised as follows:
SQL Server may become slow or unresponsive after a large number of databases are created or brought online
This behavior is caused by a per database background worker thread created as part of the Persisted statistics for readable secondary replicas feature, which is enabled by default in SQL Server 2025. The background thread is created when databases come online and can lead to worker thread pressure and reduced instance responsiveness, even when no secondary replicas are configured.
Workaround: Enable startup trace flag 15608 and restart SQL Server*. The trace flag must be enabled at startup; enabling it after startup doesn’t stop background threads that were already created for databases that have been brought online. In scenarios with no secondary replicas, this trace flag is still required as a temporary mitigation to prevent the per database background thread from being created during database startup.*
We have identified a fix for a future update of SQL Server 2025 (17.x).
I can confirm that enabling trace flag 15608 does indeed fix this issue (for us). I'd be interested to hear what others experiences are. However, we're not in the business of adding trace flags to our SQL configurations to get them to work and will wait for the next CU where hopefully this will be addressed correctly without the need for a trace flag.
I welcome everyone on this thread to share their experiences in relation to the above.
1
u/ducki666 Feb 14 '26
How can a db with 1gb mem handle 1000s of services?
1
u/ussv0y4g3r Feb 14 '26
Are both SQL 2022 and 2025 running on same Windows Server version? How about AV?
3
u/k_marts Feb 14 '26
Get a ticket into Support using the Standard edition setup as your reference.
2
u/dodexahedron 1 Feb 14 '26 edited Feb 14 '26
Another thought...
Have you tested using an instance on Linux or on a Linux Docker container and observed the same behavior?
Or have you tried Enterprise Dev edition or a trial for Enterprise, to be sure it is not still an edition-dependent behavior that just isn't documented (or still could be a bug anyway)?
You might actually be a great use case for a Docker swarm of sql express with just a small number of DBs per container SQL instance.
Or, since you obviously have no sql-level redundancy as a limitation of express, can you use localdb per application instead to isolate them more? It's still express under the hood.
3
u/chandleya Feb 13 '26
That’s… that’s some situation lol
You need metrics. “Slow” is a seat of pants observation. There’s about a million reasons this situation sucks.
1
u/Lufdo Feb 14 '26
Have you checked if both setups have same instance and database scope configurations ?
1
u/InsideOver606 Feb 17 '26
Are you able to see any locking or long running query specially on master database ?
0
u/BigHandLittleSlap Feb 14 '26
Don't tell us. Tell Microsoft. Capture the memory dumps and submit them to support. If you can reliably repro the issue with a script, create a minimal demo script to send to support.
0
u/Sergey-masyanya Feb 14 '26
Не пробовали посмотреть статистику через sys.dm_os_wait_stats?
0
u/stealth210 Feb 14 '26
Something is not right here... 100s, 1000s of databases on a single instance? For what reason?