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

Community Share PASS Data Community Summit 2027 Dates & Locations Announced

Thumbnail
passdatacommunitysummit.com
13 Upvotes

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

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

3 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 • • 13d ago

Community Share FABCON SQLCON 2027 BOGO

1 Upvotes

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

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


r/SQLServer • • 14d 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 • • 14d 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 • • 15d 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 • • 15d 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 • • 16d 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 • • 16d 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 • • 17d ago

Community Share I changed the background image for ssms22

3 Upvotes

r/SQLServer • • 17d 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 • • 17d 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 • • 18d 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

r/SQLServer • • 19d ago

Community Share Hugo Kornelis, long time #sqlfamily member, MVP, creator of SQL Server Execution Plan Reference, speaker, friend, and community member, passed away today after a prolonged fight with cancer.

Thumbnail
bsky.app
197 Upvotes

r/SQLServer • • 20d ago

Community Share I built a free, open-source AI assistant for SSMS 21 & 22 that runs entirely on a local model — no cloud, no API keys

19 Upvotes

Like many of you, I wanted AI help with T-SQL — but I didn't want my schemas, table names or data samples shipped to a remote API. Regulated data, corporate rules, or simply privacy.

So I built an open-source VSIX extension for SSMS 21& 22 that connects to a local model served by LM Studio (any OpenAI-compatible endpoint also works — Ollama, vLLM, DeepSeek, OpenAI, switchable in Options). MIT licensed, no telemetry.

What it does:

- Chat panel inside SSMS, schema-aware (tables, columns, PKs/FKs, indexes, views, procs, functions, triggers, row counts — injected into every prompt, cached)

- Execute SQL from the chat: PARSEONLY pre-check, auto-fix loop on runtime errors, idempotent DDL only

- Explain Plan / Open Plan (graphical .sqlplan viewer), Tune Query with real DMV evidence (missing indexes, dead indexes, usage stats)

- Analyze Database: one-click report from YOUR schema, not generic advice

- Works with small local models (tested with a 7B via LM Studio)

Repo (VSIX in Releases, CI-built): https://github.com/Fargo4u/ssms-ai-assistant

It's free and MIT. Feedback, issues and PRs are very welcome — especially from DBAs on what guardrails you'd want before trusting an AI near prod. šŸ™‚


r/SQLServer • • 19d ago

Discussion I’d like to share an opportunity with the community

Thumbnail reddit.com
1 Upvotes

r/SQLServer • • 20d ago

Question Linked server query fails when remote table with CHECK constraint is aliased

8 Upvotes

I'm trying to work out whether I've hit a SQL Server regression or just an obscure linked-server behaviour.

Changing the alias of a remote table in a query is causing the query to fail to compile because of a column reference in a CHECK constraint on the remote table.

I've tested this on SQL Server 2025 CU9 and SQL Server 2019 CU32 + GDR.

Example setup on SERVER1:

CREATE DATABASE TESTDB
GO
USE TESTDB

CREATE TABLE [dbo].[TESTTABLE](
[DOB] [datetime] NULL
) 
ALTER TABLE [dbo].[TESTTABLE]  WITH CHECK 
ADD  CONSTRAINT [CK_TESTTABLE_Age] 
CHECK  ([TESTTABLE].[DOB] IS NOT NULL )

Linked server call from SERVER2, where SERVER1 is a linked server:

Executing without an alias:

SELECT *
FROM SERVER1.TESTDB.dbo.TESTTABLE

Succeeds with 0 rows returned.

Aliasing to the same name:

SELECT *
FROM SERVER1.TESTDB.dbo.TESTTABLE AS TESTTABLE

Succeeds with 0 rows returned.

Aliasing to a different name:

SELECT *
FROM SERVER1.TESTDB.dbo.TESTTABLE AS TESTNEW

Fails with:

Msg 4104, Level 16, State 1, Line 51
The multi-part identifier "TESTTABLE.DOB" could not be bound.

Explicitly referencing the failing column:

SELECT TESTNEW.DOB
FROM SERVER1.TESTDB.dbo.TESTTABLE AS TESTNEW

Fails with:

Msg 4104, Level 16, State 1, Line 51
The multi-part identifier "TESTTABLE.DOB" could not be bound.

Executing the query remotely works:

EXEC('
  SELECT *
  FROM TESTDB.dbo.TESTTABLE AS TESTNEW
') AT [SERVER1]

Succeeds with 0 rows returned.

If I wrap that remote table reference in a view as below, it succeeds.

CREATE VIEW dbo.TESTNEW AS 
SELECT *
FROM SERVER1.TESTDB.dbo.TESTTABLE

GO

SELECT *
FROM dbo.TESTNEW AS XXXXX

Removing the CHECK constraint from a test copy of the table resolves the error, as does removing the table name from the column reference in the CHECK constraint.

I've ruled out a few possible causes:

  • This happens over SQLNCLI11 and MSOLEDBSQL
  • This happens at compat level 140 and 170
  • Reproduced SQL Server 2025 > SQL Server 2025
  • Reproduced SQL Server 2025 > SQL Server 2019
  • Reproduced SQL Server 2019 > SQL Server 2025

The database being queried is managed by an external party so changing the CHECK constraint to remove the table name from the CHECK constraint is possible, but difficult.

I think it could have been caused by a recent patch as I don't remember this issue existing in the past, and it means I can't query the table over linked server easily.

Has anyone seen this before? If anyone uses linked servers with older versions of SQL Server, would you be able to test if this occurs there?


r/SQLServer • • 20d ago

Community Share My Favorite Undocumented Feature in SQL MCP Server

Thumbnail
devblogs.microsoft.com
24 Upvotes

Since release 2.0, the Data API builder (DAB) base image includes a basic configuration file with a preconfigured autoentities entry that automatically exposes every table in every schema. We've never documented this. Of course, this configuration is useless without a connection string. But it opens the door to a fast agentic POC using SQL MCP Server without building your own image or mounting a custom configuration JSON file.


r/SQLServer • • 19d ago

Discussion Is SSMS The Worst GUI Application You Have Used?

0 Upvotes

I feel like I'm using GUI built for Windows 3.0.
Data is never refreshed, so I never know if I'm looking at the current database.
Database diagrams can't be updated. If I make a change to the schema I have to delete and recreate the diagram.
Changes made in 1 window are never reflected in another window.
And to wrap-up my frustration, I cannot exit the application because there is a window open with bad data, which I have to correct. There is no option to discard my changes on exit (P.S. I found a way to close the window and discard changes, but it's convoluted).


r/SQLServer • • 20d ago

Certification Data Days now has vouchers for database exams (DP-800, DP-420, DP-300)

13 Upvotes

Hey r/SQLServer, I’m on the Azure Data team. You might know me as the voucher fairy, so I’ll get right to it: Data Days has 100% discount voucher offers for DP-800 and 50% discount offers for DP-300 and DP-420. Supplies are limited, and eligibility requirements apply, so check the voucher details before requesting one.

There’s more to Data Days, too: SQL-focused learning, a DP-800 prep session, and study groups. Here’s the session schedule if you want to explore