r/SQLServer • u/brunocborges • Oct 19 '26
Community Share Faster by Design: Performance engineering in the Microsoft JDBC Driver for SQL Server
r/SQLServer • u/brunocborges • Oct 19 '26
r/SQLServer • u/Reasonable-Job4205 • Oct 19 '26
Node version 26.12.0, SQL 2022 Express
My web server is running and I am sending it a simple request using a powershell script. I can see the request hit the web server, but it immediately gives an error:
ConnectionError: Port for MySQLInstanceName not found in MyServer
I made sure that TCP/IP is enabled, Listen All = yes, set 1433 at the IPAll port, enabled the IP address for the server, enabled 127.0.0.1, and restarted the SQL Server and SQL Browser services. I also see that there is an inbound rule for port 1433 that's set to "Allow the connection", protocol type is TCP, local port is Specific Ports, and the port is set to 1433. Not sure why my web server can't reach SQL, any ideas?
Forgot to mention that the web server is running on the same server where the SQL database is.
r/SQLServer • u/ILOVESTORAGE_BE • Oct 18 '26
Former employee who recently left the company setup an AO 3 node cluster. SQL is version 2022, WS OS is version 2025. Availability mode between the nodes is Synchronous commit with 2 nodes in Automatic failover and one node in Manual.
On Oct 11, we had a SQL crash. Everything stopped working. Right before the crash, I noticed this event being logged: "Remote harden of transaction 'XXXXXXXXX' (ID XXXXXXX 0000:XXXX) started at Oct 11 2026 1:39PM in database 'XXX' at LSN (52190:XXXX:1) failed."
Shortly after: "“Unable to access database 'XXX_01' because it lacks a quorum of nodes for high availability. Try the operation again later.”
For some unknown reason, the primary node lost connection with the 2 other nodes. I checked the storage/network back-end, no pings were lost. All 3 VMs were reachable via our external monitoring solution.
On the secondary node, during the same time these errors were logged:
“Could not redo log record (XXXX), for transaction ID (XXXX), on page (XXXX), allocation unit XXX, database 'XXX_01' (database ID 6). Page: LSN = (XXX:XXX:), allocation unit = XXX, type = 1. Log: OpCode = 2, context 3, PrevPageLSN: (XXX). Restore from a backup of the database, or repair the database.”
Followed by*: “Always On Availability Groups data movement for database 'XXX_01' has been suspended for the following reason: "system" (Source ID 2; Source string: 'SUSPEND_FROM_REDO'). To resume data movement on the database, you will need to resume the database manually. For information about how to resume an availability database, see SQL Server Books Online.”*
Our DBA was able to bring everything online by removing the impacted DB from the AO group, and than add it back.
However, since this caused quite some production impact. Management is asking for a root cause. I inherited this setup, so I'm not even sure best practices are being followed. I can do some basic troubleshooting and checking logs, but I'm unable to find an explanation. When looking upon the error messages online, this doesn't give me any results. Also there's almost no Proxmox documentation or even a blog how to setup an AO SQL Server.
This has been running for months, and from my understanding, this is the first time we had this issue. I uploaded all logs to AI to assist in the troubleshooting, but even than I don't get any valid answer. It is always refering to "the network" or an underlying "storage issue" but I don't see anything there.
r/SQLServer • u/chenqiao • Oct 17 '26
I've been using SSMS daily for years and kept running into the same issues: IntelliSense stops working after aliases, schema changes don't refresh the cache, and EXEC parameter hints are basically non-existent. I tried SQL Prompt and liked it, but $210/user/year wasn't something I could justify — especially for a team where not everyone would get a license approved.
So I forked Axial SQL Tools (Apache-2.0, maintained since 2016) and built MSSQL Tool on top of it.
What it does:
What it does NOT do:
Why the fork instead of from scratch: Axial's codebase is mature and battle-tested. Forking let me focus on the completion engine rewrite, localization layer, and the features above instead of reimplementing the basics.
Links:
What I'm looking for:
I'd rather hear "this is broken" than silence. Specifically:
Not trying to sell anything — it's free and open source. If it's useful, great. If it's not, I'd rather know why.I've been using SSMS daily for years and kept running into the same issues: IntelliSense stops working after aliases, schema changes don't refresh the cache, and EXEC parameter hints are basically non-existent. I tried SQL Prompt and liked it, but $210/user/year wasn't something I could justify — especially for a team where not everyone would get a license approved.
So I forked Axial SQL Tools (Apache-2.0, maintained since 2016) and built MSSQL Tool on top of it.
What it does:
What it does NOT do:
Why the fork instead of from scratch: Axial's codebase is mature and battle-tested. Forking let me focus on the completion engine rewrite, localization layer, and the features above instead of reimplementing the basics.
Links:
What I'm looking for:
I'd rather hear "this is broken" than silence. Specifically:
Not trying to sell anything — it's free and open source. If it's useful, great. If it's not, I'd rather know why.
r/SQLServer • u/East_Sentence_4245 • Oct 16 '26
This may be a stupid question but here goes.
I connect to Azure SQL Server with user "siloadmin" that has admin rights. Once I've logged in, I go to the "Users" folder to check the same I user I logged on with, and it's not there.

I also run query and it doesn't show the user either:
SELECT
name AS UserName FROM sys.database_principals
r/SQLServer • u/kaatarina_zed_talon • Oct 16 '26
r/SQLServer • u/Top-Pudding-9196 • Oct 16 '26
I read this post from 1y ago: https://www.reddit.com/r/SQLServer/s/fjH53Pxf4e and it made my stomach churn. Asking Copilot why I get nothing other than Microsoft have made this decision because of "internal matters". What the heck does that mean?
We have Enterprise Copilot and no one here uses Github other than me. The company is not going to purchase Github Copilot just to be able to ask "Write me a query with two joins from table A to table B". LOL
Yeah nah.
r/SQLServer • u/dlevy-msft • Oct 15 '26
We just released mssql-python 1.16.0, Microsoft’s Python driver for Microsoft SQL.
Main updates:
Install:
pip install --upgrade mssql-pythonor:
conda install -c microsoft mssql-pythonFull post and release details: https://techcommunity.microsoft.com/blog/sqlserver/mssql-python-1-16-0-python-3-15-support-conda-and-faster-fetches/4564521
r/SQLServer • u/luky90 • Oct 15 '26
During failover of a MS SQL Failover Cluster I got this message in the event log. The failover itself completed but in the logfile i found this error which occured during failover:
ERR [RES] File Share <SQL Server FILESTREAM share (MSSQLSERVER)>: Error removing share 'MSSQLSERVER'. Error 2310.
The share in the failover cluster manager looks like that:

Does anyone know if this error is serious? Iam trying to reduce failover time.
r/SQLServer • u/billclevername • Oct 15 '26
Years ago, I was exposed to the ELK stack at a client. I spent some time and wrote an open source tool to import SQL Server Extended Events in Elastic Search. That is https://github.com/billgraziano/xelogstash. It runs as a Windows service and polls for new extended events every minute.
This is the last release before AI starts doing more of the coding. I've enjoyed writing it and wanted to give it a little love before AI has all the fun.
It has a few interesting features that I've added to help me
xe_description field that tries to summarize the event. For SQL events, it looks like (CPU: 12s; L: 24 GB; D: 40s) SELECT * FROM....errorlog_written event of error_reported event indicate a login failure, it populates a login_failed field with details. It also puts in in a description from the state based on Microsoft's documentation. Filtering on the existance of that field gets me a failed login dashboard across the entire enterprise.errorlog_written and error_reported events, if it finds text like [CLIENT: 10.10.1.1], it will save that address in xe_client_addresscpu_time, if the number is large enough, it populates a cpu_time_sec which is MUCH easier to filter and reason about. It does the same for logical reads, physical reads, writes, and duration.login events, it separates out the domain and user into two separate fieldserrorlog_written event, it tries to parse the type of event. This includes backups, DBCC, "info" events, and AlwaysOn. This makes it eaiser to filter out noise and find issues.If you're running Elastic or something similar, give it a try and start logging SQL Server Extended Events. Having them always there and searchable has been very helpful to me.
r/SQLServer • u/kaatarina_zed_talon • Oct 15 '26
Limitations of table-valued parameters:
SQL Server does not maintain statistics on columns of table-valued parameters.
statistics of what ? why those statistics even exist for non table-valued parameters ?
r/SQLServer • u/bobwardms • Oct 14 '26
Take a look at a new open-source, free project for you to simulate SQL workloads at https://aka.ms/sqlsimtools. This is the same set of tools I often use at customer events, podcasts, and presentations. Check out the first blog post at https://techcommunity.microsoft.com/blog/SQLServer/introducing-sqlsimtools/4563955.
r/SQLServer • u/pootietangus • Oct 14 '26
Right-click a stored procedure, select Excel or SSRS, and then the extension will generate a report using the SPROC's parameters.
Free/open-source. Requires SSMS 22; Excel output requires desktop Excel.
r/SQLServer • u/LavishnessGlass3621 • Oct 14 '26
I've been writing T-SQL and PowerShell scripts that AI coding agents (Cursor, Claude Code, Copilot) can run with guardrails, and I tested them against SQL Server 2025. Two things broke that are worth sharing, because agents get both of them wrong all the time.
1. sp_addlinkedserver can't run inside a user transaction
The "safe" pattern I started with was BEGIN TRAN ... COMMIT around the whole linked server setup. It fails right away:
Msg 15002: The procedure 'sys.sp_addlinkedserver' cannot be executed within a transaction.The fix: no transaction. Check that the linked server doesn't exist yet, create it in TRY/CATCH, and set a flag after it's created. If a later step fails (login mapping or sp_serveroption), the CATCH drops only the linked server that run created, then re-throws.
DECLARE @CreatedHere bit = 0;
BEGIN TRY
EXEC master.dbo.sp_addlinkedserver @server = @LinkedName, @srvproduct = N'',
@provider = @Provider, @datasrc = @DataSource;
SET @CreatedHere = 1;
-- logins, sp_serveroption calls...
END TRY
BEGIN CATCH
IF @CreatedHere = 1
EXEC master.dbo.sp_dropserver @server = @LinkedName, @droplogins = 'droplogins';
THROW;
END CATCH;2. You can't pass an expression as an EXEC parameter
EXEC sp_serveroption ..., @optvalue = CASE @x WHEN 1 THEN N'true' ELSE N'false' END; gives Msg 156 (incorrect syntax near 'CASE'). Parameters only take constants or variables, so put the value in a variable first:
DECLARE @rpc nvarchar(5) = CASE @EnableRpcOut WHEN 1 THEN N'true' ELSE N'false' END;
EXEC master.dbo.sp_serveroption @server = @LinkedName, @optname = N'rpc out', @optvalue = @rpc;Questions and corrections are welcome, especially if you've found a cleaner pattern for the linked server rollback.
r/SQLServer • u/VladDBA • Oct 13 '26
The latest release of PSBlitz brings:
- Support for Azure Entra MFA authentication. Now you can diagnose Azure SQL DB and SQL MI using Entra credentials instead of wrestling with SQL logins.
- Documented minimum permissions required to run PSBlitz.
- Non-default database-scoped configurations are now highlighted in the "Database Info" page of the HTML report.
- Other small bug fixes and improvements.
GitHub page: https://github.com/VladDBA/PSBlitz
Latest release: https://github.com/VladDBA/PSBlitz/releases/tag/v6.2.0
As always, any feedback, suggestions, and the occasional complaints are welcome.
For anyone not familiar with PSBlitz - it's a PowerShell-based tool that outputs SQL Server/Azure SQL DB/Azure SQL MI/Google Cloud SQL for SQL Server health and performance diagnostics data to either Excel or HTML, and saves execution plans and deadlock graphs as .sqlplan and .xdl files.
If you're familiar with Oracle, this is pretty much my attempt of a SQL Server equivalent to Oracle's AWR report.
r/SQLServer • u/unidotcon • Oct 14 '26
What are the most frequently used T-SQL queries to have and what are the best keys to use.
So far I have been using "SELECT * FROM" and "SELECT TOP 1000 * FROM" a custom line called "sp_ts". I wanted to see if you guys have other queries that would save loads of time.

r/SQLServer • u/ozzie1527 • Oct 13 '26
Sharing a case from the last few weeks in case it saves someone time, and to ask whether anyone has seen it before.
Setup
SQL Server 2022 CU27 (16.0.4295.3), compatibility level 160, PSP optimisation and CE feedback on (the defaults). A test database was restored from production. The database_id is 24 on production and 16 on test.
Symptom
A stored procedure statement joins a large table to a temp table that the caller creates before calling the procedure. On test it started timing out after the 300 s application timeout for large inputs, about 6 weeks after the restore. It wasn't slow. Each call recompiled around 20,000 times (`execution_count` 1, `plan_generation_num` 21-23k). The error log filled with error 2814, "A possible infinite recompile was detected ... The last recompile reason was 20" (Query Store hints changed). Query Store showed nothing slow, because the calls never completed. The PSP variant had about 4.3 million compiles on test against 666 on production. Production was never affected.
What we found
Steps 1-4 were observed in Query Store and in the raw handle bytes. Step 5 is our inference, but clearing the hint stopped the loop immediately and it hasn't come back.
Fix
Clearing the CE feedback hint on the new parent (sys.sp_query_store_clear_hints) and then clearing the database’s procedure cache stopped the loop straight away. A few days later we removed the stale entries that still carried production’s database_id with sys.sp_query_store_remove_query, variants first and then their parents, and cleared the cache again. No settings were changed. Removals can’t be undone, so try it on non-production first.
Open questions
r/SQLServer • u/DuoZ69_ • Oct 12 '26
I’m a PM working on database migration experiences at Microsoft.
I’m researching how much autonomy practitioners would trust an AI agent with during their database migration journey.
This is exploratory research; not a product announcement or roadmap commitment. I’m especially interested in feedback from people who have worked on real production migrations.
Which operating model would you trust?
Most importantly:
If possible, include your role and the source/target platforms. Please avoid sharing confidential details.
r/SQLServer • u/pootietangus • Oct 12 '26
I chatted with 138 SQL Server devs who field ad-hoc data requests. Only 2 of them are completely out of the loop thanks to AI.
One built a custom layer into an ASP.NET app that he also owns. The other works at a company that migrated to Databricks or Snowflake, and he just does ETL stuff now.
Does this line up with what you're seeing?
r/SQLServer • u/duendeacdc • Oct 11 '26
I'm trying to get ahead, study and implement cursor/AI in my environment. I can create reports, i got a cool page that analyzes a query plan, but this is just simple stuff all DBAs can do. Im curious to se é what are you guys doing out there with AI in the database world.
r/SQLServer • u/Mob_Pilled • Oct 10 '26
r/SQLServer • u/erinstellato • Oct 09 '26
Friday Feedback this week comes from somewhere above the Atlantic Ocean. I spent the first half of this week with our team in Serbia and it was wonderful. For me, a few days of working with folks in person moves projects forward faster than weeks of online meetings.
One of the topics of discussion was persisting Automatic Plan Correction and manual plan forcing information in Query Store. If that would be valuable to you, what is the most important data you need retained? Bonus if you share how you'd want to see that data in a report/visual.
Enjoy the weekend!
r/SQLServer • u/n8e-polymath-007 • Oct 10 '26
To monitor the performance and availability for a thick client based system we recently delivered, the customer wants us to provide Here is the requirement:
What metrics needs to be extracted to measure all response times and how to be extracted.
This has to be measured for a period of 72 days with weekly and monthly reporting. Also, we do not have access to SSMS for Azure SQL and also the Azure Portal.
Thus , we need provide instructions to the customer IT Support team and they will provide the metrics and logs.
We have tried to get some help with AI tools but got conflicting response so need an Azure expert preferably Azure SQL DBA to help.
Much appreciated and thanks in advance.
PS: Application is thick client (yes I know) so no metrics can be pulled from endpoint devices. Don't ask why.