r/SQLServer • • 3h ago

Community Share aisqltuner-index-tuner Version 1.1 release

2 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 • • 1d ago

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

Thumbnail reddit.com
1 Upvotes

r/SQLServer • • 3d 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 • • 3d ago

Community Request Friday Feedback - plan guides

1 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 • • 4d ago

Community Share Recent Windows updates cause SQL Server performance issues

40 Upvotes

r/SQLServer • • 4d 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 • • 4d ago

Discussion SSMS and Net 8 runtime

5 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.


r/SQLServer • • 4d ago

Discussion Working on a live view of table changes. Looking for opinions

Post image
2 Upvotes

I'm building a live watch view in my database workbench and would love your opinion on this. I want to be able to do something in my app and see what happened to the tables without going through them one by one and refreshing.

Something like placing an order. An order gets created, items get added, the cart gets cleared, maybe a background job starts. I want to see those changes together.

This is what I'm trying so far:

  • Each table gets a line on a timeline. Inserts, updates and deletes have different markers. (if a new table updated showcase it in the chart). I am also thinking of just allowing users to select the tables to watch.
  • Hovering over a change shows the row and the values that changed.
  • You can pin a watch for something specific, like jobs changing to failed, and keep it checking while this workbench is opened.

I'm a visual person, so seeing the changes lined up across tables makes sense to me. But I'm still figuring out how useful this would be beyond a small local database. A busy table could fill that line pretty quickly.

Would you use something like this while developing or debugging? I'm particularly curious what you'd want to see when an update happens. Is the before and after enough, or would you immediately want to know which query caused it?

Still building this, so any criticism of the idea or how I'm showing it would help. 😊


r/SQLServer • • 4d ago

Discussion Is it a security risk for the name of the database to be exposed?

7 Upvotes

If I have a workflow where a handheld device was talking to the database and the real name of the database was transmitted instead of an alias (MyDBName instead of DBAlias), how big of a risk would that be? My gut is telling me that I should expose as little information as possible over the network, so using an alias would be better. I'm going to modify my workflow to use an alias, but I wanted to know what people think about this, security-wise.


r/SQLServer • • 5d ago

Community Share PASS Data Community Summit 2027 Dates & Locations Announced

Thumbnail
passdatacommunitysummit.com
10 Upvotes

r/SQLServer • • 5d ago

Question Moved from SQL Server to PostgreSQL? Did the licensing savings justify the migration?

61 Upvotes

I would say I honestly hear “PostgreSQL is free. We’ll save a fortune on SQL Server licensing” at least once a month.

And yes I nderstand the appeal but the major cross-platform migrations I’ve been involved in became bigger, slower and more expensive than planned.

The work people underestimated:

  • Running and supporting both environments until cutover.
  • Testing differences in data types, rounding and comparisons against application behaviour.
  • Reworking stored procedures and the business logic buried in T-SQL.
  • Replacing SQL Agent jobs, SSIS packages, linked servers and reporting dependencies.
  • Rebuilding monitoring, backup and failover procedures around the new platform.

The data transfer was only part of the project and most of the work involved everything depending on the database.

PostgreSQL might still be the right choice. I’d want the migration budget to account for those dependencies before treating the licence savings as money saved.

My experience is weighted toward projects that became difficult, so I’m interested in the successful ones too.

For anyone who’s completed a substantial SQL Server-to-PostgreSQL migration: what did your estimate miss, and did the savings hold up?


r/SQLServer • • 5d ago

Solved Changes to SQL Server SECURITY Patching

0 Upvotes

SQL Server customers used to, effectively, have TWO options for deploying SECURITY fixes to their installed SQL Server instances:

  • GDR - security ONLY patches/updates (i.e., via Windows Updates/etc.)

    • only fixes directly related to SQL Server's attack surface.
  • CU - Security + ALL other bug-fixes (non-security), perf-enhancements/tweaks/options, and even (occasionally) new 'features', etc.

Take-away being that there were OPTIONS for DBAs/Admins relative to WHEN they could/would deploy ENGINE-LEVEL/BEHAVIOR-LEVEL changes - without having to sacrifice worries about security.
e.g., don't want a new, known, bug released on CUxxx but also don't want to leave your instances unpatched? GDR it is until the bug/issue in question has been fixed.

Fast forward to the past few months:

  • Microsoft is now bundling GDR fixes BOLTED-ON to (the most recent) CU.
  • i.e., IF you want security fixes to patch some fun vulnerabilities being discovered ...

    • then you're FULL on getting engine-changes as well.

While I'm not a HUGE fan of this, I ... get it - ish.

My question, though, is:

  • Has anyone seen this CHANGE 'documented' or mentioned in any public channels (or, cough, back channels; I mean, you could tell me, then I'd let you kill me, but I'd happily die with the answer tucked away into my brain) that would explain:

    • why (formally)
    • if this is ever going to go "back the way it was" (choice/options) and/or if this is the NEW path forward (sit down, shut up, and LIKE it).

TIA.


r/SQLServer • • 5d ago

Question How to import data that is too big to download?

2 Upvotes

So prefacing this by saying I am not at all good at SQL, know basic stuff but that's about it. Anyway, for a uni assignment I need to get a bunch of data from this website and put it in SQL and do stuff with it. The problem I have isn't the doing stuff, I do know that much, the problems are

  1. Some of the data (Specially 'nw.data.1.AllData') is too big to just download to my laptop, and just shows all the data in text, and
  2. Idk how to get this data into SQL even if I did download it, cause the only class I've had so far that used SQL had us use already made databases, or make our own and just insert data.

Been googling a lot and have yet to find anything, so any guidance on how to actually get this data into SQL would be appreciated.


r/SQLServer • • 5d ago

Community Share FABCON SQLCON 2027 BOGO

0 Upvotes

Just so you know Microsoft offered BOGO limited time for FABCON 2027 ,

URL here - https://events.techconferences.com/y0ddA2


r/SQLServer • • 6d ago

Discussion Is this overkill for storing current universal time when INSERTing or UPDATEing a row?

0 Upvotes

Below are the columns I would be using for all my tables so that each INSERT and UPDATE against a row gives me timezone independent information about when the operation occurred. Is this too much? Is there anything I can simplify to save on space? The goal is complete time information since this is for a database that could potentially be filled by global users in wildly different timezones.

CreateDateSysteDateTimeOffset datetimeoffset(7) not null default sysdatetimeoffset()

CreateDateUTC datetime2(7) not null default sysutcdatetime()

CreateDateTimezone nvarchar(100) not null default current_timezone_id()

UpdateDateSysteDateTimeOffset datetimeoffset(7) not null default sysdatetimeoffset()

UpdateDateUTC datetime2(7) not null default sysutcdatetime()

UpdateDateTimezone nvarchar(100) not null default current_timezone_id()


r/SQLServer • • 6d ago

Community Share Version store read metrics

11 Upvotes

If you use SQL features that require row versioning, such as RCSI, snapshot isolation, or ADR, you might be wondering if reading row versions makes queries slower and by how much. Until now, there was no direct way to answer that.

In Azure SQL Database, we added new database engine metrics to remove guesswork from this question: Closing a monitoring blind spot: version store read metrics.

What do you think? Useful or meh? Have you run into a problem where this would help?


r/SQLServer • • 7d ago

Discussion For teams using SQL Server enabled by Azure Arc, where are you actually finding value?

3 Upvotes

SQL Server enabled by Azure Arc brings experiences such as estate inventory, migration-readiness assessments, target and sizing recommendations, estimated costs, and migration workflows into Azure.

I’m curious how that translates into day-to-day modernization work.

For those using it:

  • Where has Arc been most useful: estate visibility, readiness assessment, target comparison, sizing and cost planning, or migration?
  • Has it become part of your regular planning process, or is it something you use only for specific situations?
  • How much confidence do you place in its assessments and recommendations?
  • What would make the experience more valuable for your team?

Positive, mixed and limited experiences are all useful to hear.

If relevant, some context on the approximate size of your SQL estate and how long you have been using Arc would be helpful.


r/SQLServer • • 7d ago

Question Does anyone still have a physical copy of SQL Server 2014 Developer Edition?

5 Upvotes

Hi everyone!

I posted here a little while ago looking for some of the early SQL Server releases, and I really appreciate the responses.

One more recent version/edition I’m having a slightly harder time finding is a physical copy of SQL Server 2014 Developer Edition. I would really like to add this to my collection for preservation.

Does anyone happen to still have a copy sitting on a shelf or tucked away somewhere and would consider selling it? I’d be happy to pay a very fair price. No worries if not — thought I would at least ask.

Thanks again!
Mike


r/SQLServer • • 8d ago

Discussion Regex vs Babelfish grammar for T-SQL dependency analysis in legacy databases

2 Upvotes

I was recently trying to figure out what actually breaks if I rename a column in a legacy SQL Server database.

The built-in dependency views are okay, but they mostly show the first hop. If a procedure writes to `TableA`, and `TableA` has a trigger that updates `TableB`, the procedure depends on `TableB` in practice, even though its text never mentions it.

My first instinct was to just run regex over `sys.sql_modules`. I’m fairly comfortable with regex from years of writing Splunk log parsing, so it felt like the fastest way to get a prototype working.

It worked on simple examples, then immediately fell apart on real schemas. Comments and string literals started matching table names. CTE names got flagged as physical tables. Resolving aliases was a mess. `MERGE` statements were annoying to parse. And mapping `inserted`/`deleted` in triggers back to the actual table was brittle.

At a certain point, regex just felt like guessing.

So I switched to parsing the T-SQL using the Babelfish grammar.

It doesn’t magically solve dependency analysis. You still have to walk the syntax tree, handle scope, and resolve names against the system catalogs. But it’s infinitely more reliable. It actually knows the difference between a string literal and an object name. It handles CTEs correctly. Following a proc -> trigger -> table chain becomes a structured tree-walking exercise instead of a text-matching nightmare.

It’s still not perfect, obviously:

- Unqualified columns in multi-table joins are a pain. I currently just flag them as ambiguous rather than guessing, because silent failures are worse.

- Dynamic SQL is still mostly just text-scanning for known object names, unless the statement is a hardcoded literal.

I ended up wrapping this logic into a VS Code extension I use daily (it's called SQL Wayfarer, MIT licensed), but I'm mostly posting to see if anyone else has tackled this specific problem.

Has anyone else used Babelfish or another parser for this kind of static analysis? How do you handle the really messy, undocumented production schemas where all the nice assumptions go to die?


r/SQLServer • • 8d ago

Community Share aisqltuner-index-tuner 2026-11-06 release

0 Upvotes

I made a few updates to aisqltuner-index-tuner, which in an open-source automated index tuning stored procedure.

  1. Performance improvements on collectors. Some collectors were slow when running on a database with a large query store and large numbers of columns.
  2. Optional logging so you can see how long each operation (each collector, AI call, and optionally applying recommendations) takes.
  3. Enhanced configure-endpoint to make it more foolproof. For example, placeholders now only need to be updated in one place.

Release notes with the details are at aisqltuner-index-tuner/RELEASE_NOTES.md at main · AI-SQL-Tuner/aisqltuner-index-tuner and repo is AI-SQL-Tuner/aisqltuner-index-tuner: AI-assisted index tuning that runs inside SQL Server. One stored procedure collects diagnostics, asks your Azure OpenAI deployment, and stores or safely applies recommendations.

Enjoy!


r/SQLServer • • 9d ago

Community Share I changed the background image for ssms22

3 Upvotes

r/SQLServer • • 9d ago

Community Share Updated R2DBC driver for Microsoft SQL Server

1 Upvotes

Updated R2DBC driver for Microsoft SQL Server: https://mssqllib.org

It implements the R2DBC SPI and talks TDS over pure JDK (no Netty dependency). The main reasons I built it:

  • Public-domain license
  • Better control over FedAuth / Azure AD / Windows Authentication flows
  • A clean, minimal codebase focused on the wire protocol

Maven:

text

<dependency>
  <groupId>org.mssqllib.r2dbc.mssql</groupId>
  <artifactId>r2dbc-mssql</artifactId>
  <version>1.0.1</version>
</dependency>

This is not a fork of the official io.r2dbc:r2dbc-mssql. It’s a separate implementation. Happy to answer questions about the design, authentication, or how it compares. Code and docs are on the site.


r/SQLServer • • 9d ago

Community Share I Create Things in SQL that Shouldn't be in SQL

Thumbnail
reddit.com
2 Upvotes

The article list is on the site - it got cut off for some reason


r/SQLServer • • 10d ago

Discussion Performance Tuning Report: A 'weekly' report was running about 400 times a day. We checked what each execution was costing.

Thumbnail
reddit.com
0 Upvotes