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

Community Share I changed the background image for ssms22

3 Upvotes

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

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

Thumbnail reddit.com
1 Upvotes

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


r/SQLServer • • 20d ago

Community Share Get-SqlSafe 2026.6 now supports Azure SQL Database (free PowerShell security assessment for SQL Server)

Post image
10 Upvotes

I've released Get-SqlSafe 2026.6, the latest version of my free PowerShell-based SQL Server security assessment tool.

The biggest addition is Azure SQL Database support, including SQL authentication and interactive Microsoft Entra authentication with MFA.

Since I wanted to keep the script usable in restricted on-premises environments, the Azure-specific functionality lives in a separate PowerShell module (Get-SqlSafe.Azure.psm1) that is loaded only when needed. If you're assessing SQL Server on-premises, in a VM, or on Amazon RDS, the standalone script continues to work without additional PowerShell modules.

Other changes include:

  • A new check for instance-wide cross-database ownership chaining, complementing the existing database-level check.
  • Improvements to report counts, filtering, printing, and the presentation of skipped checks.
  • Platform-specific handling of security checks that aren't applicable or accessible in Azure SQL Database.

The assessment is read-only and generates local HTML reports. Azure SQL Database has a smaller set of applicable checks than regular SQL Server, and Azure control-plane configurations are outside its scope.

The script and documentation are available on GitHub:

https://github.com/Sarpedon-Quality-Lab/sql-security-community-scripts


r/SQLServer • • 20d ago

Community Share mssql-python 1.17.0 released: bulk copy fixes, faster pool recovery and correct nextset() rowcounts

3 Upvotes

We just shipped 1.17.0. It's mostly bug fixes, and several of them came from issues and PRs filed by people in this community.

What changed

  • Bulk copy (bulkcopy() / bulkcopy_arrow())

    • No longer breaks after a package upgrade
    • Handles UTF-8 text correctly
    • Fails early with a clear error when the destination name isn't supported
    • Stops silently truncating high-precision datetime values
  • Connection pool reuse: clean connections are returned and reused with less overhead
  • Dead pooled connections: checkout gives up after the login timeout and opens a new connection, instead of hanging for many minutes
  • nextset() rowcount: each result in a multi-statement batch or stored procedure now reports its own row count. Before this fix, every result reported the count from the first statement.
  • PEP 249 Timestamp(): microsecond is now optional, so the standard six-argument call works

Thanks to Jhonatas2, oscarrobertson, phelipelui, and austinaviv for the fixes.

pip install --upgrade mssql-python

Full write-up: https://techcommunity.microsoft.com/blog/sqlserver/mssql-python-1-17-0-more-reliable-bulk-copy-faster-pool-recovery-and-db-api-fixe/4569925

We'd love to hear what you think. What parts do you love and what parts are still missing for you?


r/SQLServer • • 20d ago

Community Share I built a free, read-only health check for SQL Server (open source, no telemetry). Looking for feedback on the checks

Post image
1 Upvotes

Disclosure: I work on codeDB, a SQL Server/PostgreSQL monitoring product. This tool is a separate free, Apache 2.0 project from the same team, and it doesn't phone home.

The problem: when you inherit an instance (or get called in as a consultant), the first hour is always the same checklist. Backups, CHECKDB, Agent jobs, waits, blocking, tempdb layout, missing/unused indexes, config left at defaults, version out of support. I wanted that hour to be one command, with evidence instead of opinions.

codeDB Lens connects with a read-only login, runs 13 SQL Server rules and writes a single HTML + JSON report with an A-F grade.

What I tried to get right:

- Read-only. No DDL/DML, no agent on the server. Needs VIEW SERVER STATE, VIEW ANY DEFINITION, CONNECT ANY DATABASE and read on msdb (scripts in the docs). No data access.

- No telemetry. Nothing from your instance leaves the machine. The only network call is an optional once-a-day version check you can turn off.

- Every finding shows its evidence: the values, the query that produced them, and when.

- Honest coverage. If a rule can't run (permission, version, timeout) it says "No data" and lowers the coverage seal, instead of showing a fake OK.

- `--redact` masks server, database, object and login names (and drops query text), so you can send a report to a vendor or client.

- `record` samples the instance for up to 24 h (overhead measured and documented) and turns it into a minute-by-minute timeline of blocking, long queries, waits and worker usage.

- Rules are YAML + a SQL file, so adding one doesn't touch the engine.

- It also runs as an MCP server, so Claude/Copilot/Cursor can run the check and explain it (read-only, local).

Targets SQL 2017-2025, Azure SQL MI and RDS (2016 best-effort; Azure SQL DB covers only some rules). Windows GUI + CLI, Linux CLI, Docker image.

Windows binaries are not code-signed yet (certificates are expensive for a free project), so SmartScreen will warn. There's a page explaining how to verify the download, and Scoop/Docker as alternatives: https://lens.codedb.com.br/windows-warning/

Sample report (synthetic data): https://lens.codedb.com.br/demo/report.html

Repo: https://github.com/codedb-io/codedb-lens

Site: https://app.codedb.com.br/lens?utm_source=reddit&utm_medium=social&utm_campaign=sqlserver

What I'd really like: which checks you run on day one of a new instance that I'm missing, and which of my rules you think are wrong or too noisy. Rule ideas as issues are very welcome.


r/SQLServer • • 20d ago

Question Best approach for migrating SQL Server databases between Azure VMs?

Thumbnail reddit.com
0 Upvotes

r/SQLServer • • 21d ago

Question SQL Server 2022 x Hyper-V BP

2 Upvotes

We're currently exploring Hyper-V as an alternative to VMware, like many out there.

We want to do some underlying metric analysis to compare to production, but I'm trying to make sure anything we're creating is designed to best practices.

I appreciate when it comes to virtualized VMs for SQL that you're suppose to enforce a iSCSI controller per virtual disk. But my question is around the underlying disks storing those virtual disks, do people tend to favor a 1:1 mapping - so say D: on it's own logical volume, F: on it's own logical volume rather than one logical volume for every single virtual disk?

Cheers.