r/SQLServer • • 21d ago

Discussion November 2026 | "What are you working on?"

3 Upvotes

Welcome to the open thread for r/SQLServer members!

This is your space to share what you’re working on, compare notes, offer feedback, or simply lurk and soak it all in - whether it’s a new project, a feature you’re exploring, or something you just launched and are proud of (yes, humble brags are encouraged!).

It doesn’t have to be polished or perfect. This thread is for the in-progress, the “I can’t believe I got it to work,” and the “I’m still figuring it out.”

So, what are you working on this month?

---

Want to help shape the future of SQL Server? Join the SQL User Panel and share your feedback directly with the team!


r/SQLServer • • 22d ago

Discussion November 2026 | Job Opportunities

10 Upvotes

Welcome to the monthly job thread!

Posting a job or opportunity? Include:

  • Role title and description
  • Location or remote/hybrid status
  • Company or client context
  • Direct application link

Looking for work? Share your skills, experience level, and what you're looking for.

Rules:

  • One top-level comment per opportunity
  • No "DM me" or link-free posts — include a direct, verifiable link
  • Scam or misleading comments will be removed and may result in a ban

r/SQLServer • • 7h ago

Discussion Building a front end host for MCP services and a chat LLM

0 Upvotes

If you were building a front end host for MCP services from a SQL Server database and a chat interface to an LLM what would you use as the front end? Specifically for an internal corporate rollout

* Develop using React as a web application

* Develop using Winforms as a desktop app for windows

* Develop using MAUI so it supports both Windows and MAC clients

Just looking for some ideas of what people have actually done in corporate environments


r/SQLServer • • 1d ago

Solved How to import xml data from a file that has namespaces

4 Upvotes

So I have an xml file structured like this

<Customers>

<Customer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DataGenerator">

<Age>86</Age>

<CustomerId>101</CustomerId>

<Email>R_Heimbach@gmail.net</Email>

<Name>Robert Heimbach</Name>

<Orders>

...

</Orders>

</Customer><Customer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DataGenerator">

<Age>54</Age>

<CustomerId>102</CustomerId>

<Email>R_Heimbach@here.net</Email>

<Name>Rob Heimbach</Name>

<Orders>

...

</Orders>

</Customer></Customers>

*Replaced the orders with just "..." since they aren't important rn

And the issue I'm having with getting this data into a table is the namespaces. This is the query that I'm trying to use

INSERT INTO TestCustomers(Age, CustomerId, Email, Name)

SELECT

`TEST_XML.Customer.query('Age').value('.', 'INT'),`

`TEST_XML.Customer.query('CustomerId').value('.', 'INT'),`

`TEST_XML.Customer.query('Email').value('.', 'VARCHAR(50)'),`

`TEST_XML.Customer.query('Name').value('.', 'VARCHAR(70)')`

FROM (SELECT CAST(TEST_XML AS xml)

FROM OPENROWSET(BULK 'FilePath', SINGLE_BLOB) AS T(TEST_XML)) AS T(TEST_XML)

CROSS APPLY TEST_XML.nodes('Customers/Customer') AS TEST_XML (Customer);

And it works fine if I remove the namespaces from the data, but if I keep them it does not work and after like an hour of googling stuff, I can't find any examples of how to make this work with namespaces. I saw Xquery recommended, but I tried that and couldn't get it working, and also found very little actual information on how to use it so I don't really even know where to start there.

Any help would be appreciated, or even just a link for where to look, cause I am lost.


r/SQLServer • • 21h ago

Question Negative reseed risks

Thumbnail reddit.com
1 Upvotes

r/SQLServer • • 1d ago

Question Sanity check: my rules for flagging duplicate and unused indexes. Where would they be wrong?

2 Upvotes

I'm a developer thinking about a small tool for teams that have SQL Server but no DBA. It would read metadata only (index definitions, usage stats, Query Store) and tell you what looks wrong, with an explanation. No data from your tables, and nothing gets changed automatically.

Before I write any code I want to know if my rules are sane, because I don't have a DBA to check them. Here are the first two. Please tell me where they would be wrong or dangerous:

Duplicate index: same key columns in the same order, same INCLUDE columns, same filter, same table. Keep the one backing a PK/UNIQUE constraint or an FK, flag the other.

Unused index: zero seeks/scans/lookups in sys.dm_db_index_usage_stats, but non-zero updates, and the server has been up for at least 30 days. Never flagged: PK, unique, FK-supporting, filtered indexes, or tiny tables.

Questions:

  1. What cases would make either rule give a bad recommendation? (restarts, rebuilds, Availability Groups, indexes used only for monthly reports, etc.)
  2. Is 30 days a reasonable minimum, or would you want longer?
  3. What would you want to see in the output before you trusted it?
  4. Would you ever let a tool like this generate a DROP script, or is a report with an explanation as far as you'd go?

The logic is close to what sp_BlitzIndex already does, so I'm especially interested in where you think it's not enough.

Thanks for any feedback.


r/SQLServer • • 1d ago

Community Share Another SQL2025 bug

0 Upvotes

I just like you to participate in my SQL Server 2025 experience... recently I have revived an old lab server (dual Xeon 2697v2, 512 GB RAM, 4 TB NVME storage) and everything went flawlessly... apart from the Developer edition hickup with the disabled TCP IP protocol I was able to use it.

OS Windows Server 2025, SQL Server 2025.

But then installing a second one in a virtual machine... that VM was domain joined, the pyhsical server wasnt. And ran into all unbelievable trouble... the VM already had a SQL Server 2022 on it. That works fine. OS Server 2016

The 2025 instance? Toast.

- when attempting to connect it I got an error 1398. According to the documentation this originates from a time diffrence. But the server clock and the client clock differece is some seconds, that happens always becaue Windows doesnt sync clocks permanently, only once a day. And when the hypervisor shifts CPU cores then the Windows clock sometimes reads some seconds behind or in the future.

Then second root cause... TLS 1.3 handshaking problem... but the server did not force encryption. If enabled the SQL 2025 demands TLS 1.3, without ... unencrypted. To make sure that it didnt accidently read out the GPO for encrpytion - that GPO wasnt set. And SQL servers generally ignore the encrpytion for the TDS protocol...

Connecting it by TCP-IP adedress : error 64

And giving up. Waste of time.

well then I thought I can import the data from the pyhsical server into my SQL 2022 instance. My favorite client - native client 11 - not present as listener on the Server 2025. Then I tried the Microsoft OLEDB provider... it connected but then the integration tool didnt knew how to convert char(10) into char(10).

Tried the OLEDB driver 19? Connectivity problem ... obviously the old 19.0 was installed which has a bug that it forces encryption even if the client sets "encryption=optional". The OLEDB18 finally was able to import the table data... the "check for updates" doesnt download and install the OLEDB19.2 or newer where this is fixed.

I gave up on SQL Server 2025, and I believe the main issue might be an incompatibiltiy with the OS, Windows Server 2016 which is now end of life. But why didnt the setup tell me this?


r/SQLServer • • 3d ago

Community Share I made four small SQL Server tools that run entirely in your browser (formatter, CSV → INSERT, IN-list builder, CONVERT date styles)

11 Upvotes

I kept pasting work SQL and data into random online formatters and converters and didn't love that, so I built a few that run 100% client-side. Nothing you paste is uploaded. The pages' security policy only allows a cookie-free page-view counter, and you can check that in your browser's network tab.

  • T-SQL formatter. Handles CTEs, CASE, MERGE, [bracketed] names, N'...' strings and GO batches. It changes only whitespace and keyword case, and never touches identifier case (it's careful with columns named type, language, date etc.).
  • CSV → INSERT. Paste CSV or cells from Excel. Escapes quotes, keeps leading-zero codes like 02134 as strings, and splits into batches of 1,000 rows to stay under SQL Server's VALUES limit.
  • IN-list builder. Paste a column of values and get a quoted, de-duplicated IN (...) list.
  • Date format converter. Shows what CONVERT returns for every documented style, or paste a date string to find which style reads it. For example, with 2026-03-07 14:05:09.123:101 03/07/2026 103 07/03/2026 112 20260307 23 2026-03-07 120 2026-03-07 14:05:09 126 2026-03-07T14:05:09.123 Every style was checked against SQL Server 2019 output, not just the docs.

https://querybench.dev

I made it, it's free, and there's no sign-up. I'd really like to hear what breaks: SQL the formatter mangles, CSV it parses wrong, or a small tool you wish existed.


r/SQLServer • • 3d ago

Community Share Trying Database Agents with Azure SQL Database

7 Upvotes

When an Azure SQL Database issue shows up, Database Agents in Fabric Database Hub can help investigate supported performance conditions and show the evidence and guidance behind the issue. Azure SQL Database support includes Hyperscale and serverless.

Database Hub also brings together a wider SQL estate, including SQL Server on Azure VMs and SQL Server enabled by Azure Arc. Agent support is narrower than the Hub’s overall coverage.

If you try it, I’d be interested in hearing about an issue you investigated. Did the evidence help you understand what was happening? What would you want to see next?


r/SQLServer • • 3d ago

Community Request Friday Feedback - increasing the number of steps in the histogram

4 Upvotes

Happy Friday folks, today's feedback is related to a long-standing request to increase the number of steps in the histogram. I've linked the feedback item below and my request is that folks go to the feedback item and, if you'd like to see more steps, upvote it *and* add a comment about why, and the number of steps you want to see. 📊

If you don't have a login for the site, and don't want to create one, you can vote and comment below. Some of you will probably do both. That's cool too 😉

Finally, for context, other databases offer max values of 100, 255, 1024, 2048, and 10000. Remember: just because you can, doesn't mean you should. There are trade-offs for adding more steps...are those trade-offs ones you will accept?

https://feedback.azure.com/d365community/idea/76e6b527-5725-ec11-b6e6-000d3a4f0da0


r/SQLServer • • 3d ago

Community Share Microsoft Drivers for PHP for SQL Server 5.14.0 released - PHP 8.6 support

11 Upvotes

Working late tonight for a great reason - We just released Microsoft Drivers for PHP for SQL Server 5.14.0.

What changed:

  • Added support for PHP 8.6
  • Continued support for PHP 8.4 and 8.5
  • Removed support for PHP 8.3 and earlier
  • New releases now publish through PIE instead of PECL

Install:

pie install microsoft/sqlsrv
pie install microsoft/pdo_sqlsrv

Full blog post: https://techcommunity.microsoft.com/blog/sqlserver/microsoft-drivers-for-php-for-sql-server-5-14-0---now-with-php-8-6-support/4574976


r/SQLServer • • 4d ago

Community Share We just published mssql-python 1.18.0

8 Upvotes

This release focuses on performance and reliability:

  • Faster fetch paths and repeated-query execution
  • Better prepared statement reuse and pyformat handling
  • Custom application names for easier monitoring
  • Fixes for pooled connection behavior and Arrow reader shutdown

Blog post with details:

https://techcommunity.microsoft.com/blog/sqlserver/announcing-mssql-python-1-18-0-faster-fetch-paths-smarter-reuse-stronger-reliabi/4574946


r/SQLServer • • 4d ago

Question Latest Windows patches on the Linked Server OLEDB bug

14 Upvotes

The October 13 patch introduced a bug in Linked Servers where the connections were not cleaned up and it still isn't fixed. https://support.microsoft.com/en-us/servicing/os/windows-server/2026/11/kb5136487-windows-server-2022-update (see known issues)

I see Linked Servers heavily used in my workplaces where the Linked Server definition is to other MSSQL Servers.

Is the issue occurring where the Linked Servers are other SQL Servers, or is it limited to non-MS?

Has anybody noticed issues?


r/SQLServer • • 5d ago

Discussion Anyone stopped nightly index rebuilds and seen no downside?

37 Upvotes

For example an index hits 30% fragmentation, the job rebuilds it. Does anyone check whether performance improves enough to justify the work?

I posted about this on LinkedIn a while back and got two useful examples.

One DBA stopped nightly rebuilds spilling into business hours and addressed the query problems with targeted statistics updates. Another described a page-split storm after rebuilding nonclustered indexes at fill factor 100.

We’ve been working on page-density checks ourselves. Checking every index was expensive before we’d even rebuilt anything, so we narrowed the checks to heavily used indexes.

For rowstore indexes, low page density deserves attention. Half-empty pages still occupy buffer-pool space when cached. But packing everything tightly won’t necessarily help if the write workload quickly splits those pages again.

And if a query improves after a rebuild, was the benefit from updating the index statistics? Would a stats update alone have been enough?

My view is to start with the indexes the workload depends on and establish what needs fixing. Crossing a fragmentation threshold isn’t enough reason on its own.

Anyone here reduced scheduled rebuilds? What improved, and what eventually needed attention?


r/SQLServer • • 6d ago

Discussion Post-ADS poll: what’s your main SQL Server client now?

3 Upvotes

ADS users had to move somewhere this year. Did you go back to SSMS, switch to VS, or jump to something else entirely? What’s missing in your current setup?


r/SQLServer • • 7d ago

Community Share aisqltuner-index-tuner Version 1.1 release

8 Upvotes

aisqltuner-index-tuner, an open-source automated index tuning stored procedure for SQL Server 2025 and Managed Instance, is now at version 1.1.

Version 1.1 focuses on production readiness: automatic cleanup, safer index changes, improved reliability, and improved security.

Specifics are:

  1. Run history cleanup. Old runs used to be kept forever, so history tables kept growing. Two new settings delete old runs after a number of days. Each run cleans up after itself, so one Agent job is enough. There’s also a newsp_AIIndexTuner_Purge stored proc to clean up on demand.
  2. Safer automatic changes.

    • New limits skip index builds on very large tables, or for indexes over a size you set. To help stay within a maintenance window a new time limit parameter stops new changes from starting after a specified number of minutes in the run.
    • Builds give up after a short lock wait instead of blocking other work.
    • Before dropping an index for low usage, the procedure validates actual index usage statistics rather than relying solely on AI recommendations. It also never drops a unique index for low use.
    • Widening an existing index now keeps its compression and fill factor.
  3. Safer on busy servers. Data collection no longer waits indefinitely when blocked, and the physical-stats checks can be capped by table size or disabled completely to avoid adding load when a maintenance window is unavailable.
  4. More reliable AI calls. Brief throttling or network errors are now retried instead of failing the run. A response that times out is cancelled, so it stops using tokens. The copy of each request kept on the Azure OpenAI side is now deleted after use.
  5. Security and privacy.

    • The setup script is simplified so endpoints only need to be entered once and it now removes the API key from the plan cache and Query Store.
    • The AI is told to treat query text in the input as data, never instructions.
    • The README now spells out exactly what data is sent and what is kept.
  6. Fixes.

    • Databases whose collation differs from the server’s now work.
  7. Housekeeping. There’s a version stamp (SELECT AIIndexTuner.fn_Version();), an uninstall script, and automated tests on every change. The repo also now includes a CONTRIBUTING.md.

Release notes with the details are at aisqltuner-index-tuner/RELEASE_NOTES.md at main · AI-SQL-Tuner/aisqltuner-index-tuner and the repo is AI-SQL-Tuner/aisqltuner-index-tuner.

Let me know if you have any questions or feedback.

Enjoy!


r/SQLServer • • 7d ago

Solved SSRS failure with windows update fix..

Thumbnail reddit.com
3 Upvotes

r/SQLServer • • 7d ago

Solved How do I speed up this query?

0 Upvotes

This is the query I have:

SELECT o.soc_text AS [Occupation Title], COUNT(a.series_id) AS [Records], CONCAT('$',ROUND(AVG(a.value),2)) AS [Average Salary]

FROM occ AS o

LEFT JOIN series AS s

ON o.soc_code = s.soc_code

LEFT JOIN all_data AS a

ON s.series_id = a.series_id

WHERE s.datatype_id_code = 10

GROUP BY o.soc_text, o.soc_code

ORDER BY o.soc_text

It currently takes ~9 seconds, and I need it to take <1 second, and I have genuinely no clue what I'm doing. In my second class at uni that's using sql, and in my first class we learned pretty much nothing about optimizing queries, just learned basic sql commands and stuff; and now in my second sql class we have to optimize a query that's querying like millions of lines of data, and I am quite stuck. Most of that info isn't really relevant, I just felt like complaining.

Anyway, any help would be greatly appreciated, preferably keep it in simple enough terms so I can actually understand it lol.


r/SQLServer • • 8d ago

Discussion Looking for unique, real-world database project ideas (MS SQL Server + C#)

Thumbnail reddit.com
1 Upvotes

r/SQLServer • • 10d ago

Discussion Interested to see peoples MDF/LDF sizes to settle and argument

7 Upvotes

I’ll cut to the chase. We support a company server side, we do the hardware and vm support plus patching etc and another company supports their proprietary software on one of the said servers. The software they have is backed by SQL.

We ran into an issue this week where the logs disk filled up and placed the database on a separate disk into recovery. It then had to replay the LDF over the MDF for consistency etc.

The trouble is the LDF at that point was 992gb. Yes you saw that correct. And it reported it would finish in around three days…

The MDF is 2.4Tb.

Basically my argument is that if setup correctly the LDF should never be that size given backups happen every 15 minutes.

They said they needed additional space so we gave them an extra 1tb which the used to attach a second log file onto the database. This has since used an additional 400gb for logs.

Can I ask, does this sound right to you guys why are the logs so huge, we can’t just keep allocating more and more storage to logs. Surely the logs should truncate?

Thoughts?


r/SQLServer • • 10d ago

Community Request Friday Feedback - plan guides

2 Upvotes

Friday Feedback this week is about a capability that has been around for a long time in SQL, but in my experience, I haven't seen a lot of folks use it. But maybe I'm an anomaly!

Question: Do you use plan guides in your current environment?

Feel free to provide more details in a comment about what problem this helps you solve (and why you can't use plan forcing 😉)


r/SQLServer • • 11d ago

Community Share Recent Windows updates cause SQL Server performance issues

41 Upvotes

r/SQLServer • • 11d ago

Community Share Get-SqlSafe with refreshed design and custom Note field released at PASS Summit

Post image
5 Upvotes

At the PASS Data Community Summit I published another update for Get-SqlSafe:

Besides a modernized design and several fixes, you can now specify a custom note to be shown in the report header. This will help to put the report in context, and can also be used to keep track of who prepared it.

If you haven't downloaded Get-SqlSafe yet: it is a free, low-friction, UI-based PowerShell script that scans your SQL Server for a selected list of high-level security posture indicators.
It supports SQL Server 2016 up to 2025, SQL Server on AWS RDS and Azure SQL Database.

You can get get-SqlSafe for free on Github https://github.com/Sarpedon-Quality-Lab/sql-security-community-scripts or Sarpedon Quality Lab's resources page: https://sarpedonqualitylab.us/resources/

If you need to run it at scale against multiple SQL Servers, you can see and download some examples on how to do that is these blog-posts:

Running Get-SqlSafe at Scale Across a SQL Server Estate

Building a SQL Server Estate Summary from Get-SqlSafe Reports

Leave a star at Github if you like it. And your feedback helps me prioritize functionalities to be included.


r/SQLServer • • 11d ago

Discussion SSMS and Net 8 runtime

7 Upvotes

Latest SSMS 22.12.0 still installs .Net 8 runtime even though MS dropped support for it!

What is stopping Micros~1 from moving to using newer framework?

Disappointing.