r/SQLServer

SQL Server tools I’d pick depending on the job

SSMS is still the default for SQL Server, but I don’t think one tool covers every workflow well. So I’d split it by the actual job.

For quick admin work: SSMS. Still the safest default. Free, official, familiar. Good for quick checks, server settings, security, backups, and all the normal admin stuff.

Bad part: it starts feeling clunky when you do heavier dev work.

For daily SQL development: dbForge Studio for SQL Server Better fit when you spend a lot of time writing and cleaning up SQL. Autocomplete, formatting, snippets, query builder, debugging, schema/data compare.

Bad part: Windows-native and paid if you need the full feature set.

For release-heavy teams: Redgate SQL Toolbelt. Good when database changes need versioning, review, compare, and a proper deployment process around them.

Bad part: expensive, and the workflow can feel more like SSMS plus extra add-ons than one unified place to work.

For auditing/recovery/very specific tasks: Quest (ex ApexSQL). Makes sense when you need a tool for one painful thing, like auditing, monitoring, or recovery.

Bad part: can feel fragmented fast.

For older enterprise setups: Toad for SQL Server. Still around, especially in teams that used Toad for years.

Bad part: heavier and feels dated.

My take: SSMS is fine as the base. But once you’re doing serious SQL development, comparing environments, or pushing DB changes through releases, you usually need something else next to it.

reddit.com
u/nvigcabi — 17 hours ago

Friday Feedback: SKILLS for Agent mode

Hey folks! As we are working toward Agent mode for GitHub Copilot in SSMS, we have been working with several amazing folks internally to develop skills for the agent. Examples include*:

  • check-live-blocking
  • plan-cache-analysis
  • investigate-sql-cpu-pressure
  • resource-usage-azuresql

(*this is not a complete list!)

What other skills would you like to see for Agent mode?

reddit.com
u/erinstellato — 16 hours ago

SSAS Load Balancing with Kerberos

As part of a lifecycle management project, we are moving from a single SSAS server with two instances (SERVER1/MULTI and SERVER1/TAB) to a process server (PROCESS/MULTI and PROCESS/TAB) and two load balanced query servers (QUERY1/MULTI and QUERY1/TAB on one, QUERY2/MULTI and QUERY2/TAB on the other).

We are attempting to use a hardware appliance for load balancing between the two instances across the two servers which requires setting up IIS and MSMDPUMP (based on Configure HTTP Access to Analysis Services on IIS 8.0 | Microsoft Learn).

Many of the reports that use the multidimensional and tabular instances require Kerberos to work. I found this at SPN registration for an Analysis Services instance | Microsoft Learn:

>SPN registration for SSAS instances listening on fixed ports
You can't specify a port number on an Analysis Services SPN registration. The Analysis Services SPN registration can only use instance name. If you installed Analysis Services as a default instance and configured it to listen on a non-default port, you can't connect to that instance using Kerberos. You must configure it to listen on the default port (TCP 2383) for enabling Kerberos connections to that instance. A default instance of Analysis Services listening on non-default port can only accept NTLM connections. For named instances, you need to start SQL Server Browser service and use instance names in your connection strings instead of port numbers.

According to Configure the Windows Firewall to Allow Analysis Services Access | Microsoft Learn, "You cannot use a non-default port for Analysis services if you need to connect to your instance using Kerberos."

I have also found that, unlike the relational database engine, Analysis Services does not allow you to add a NIC to the server and dedicate it to a specific instance. Based on what I’ve found online, SSAS always listens on all IPs (except for some edge cases around clustered instances that don’t apply here).

We are also looking at Windows Network Load Balancing (NLB) instead of the hardware appliance, but I’m wondering whether Kerberos would still be an issue with that. Given that we have two instances on each server and they both require Kerberos, is load balancing even a workable “solution” or are we stuck with either having a single query server (abandoning load balancing) or splitting the two instances onto different servers (additional licensing)?

u/Afraid_Baseball_3962 — 15 hours ago

Grid field width default increase

Hopefully somebody from the SSMS team will see this.

I’ve been using SSMS for over 15 years and I sat down to do some work this morning and I capture error messages in the database from the try catch the one thing that has always annoyed me is that I always have to stretch out the message on the grid to read the whole thing and there’s not an option to make the default as wide as the longest message in the results.

This shouldn’t be hard to implement because I know this is done I think and see or C+ plus and the grid has options for setting the width of each individual field.

So that would be an option I would like to see is that you could keep it default at the cutoff or you can specify a max or have auto size without having to click on the grid at all.

Just wondering if any other developers out there wish this option was available as well.

Thank you and have a great day! :)

reddit.com
u/Codeman119 — 20 hours ago

Simple SQL tool for a developer to see runtimes/reads and identify the longest running statement

I inherited a sql server script that's close to a thousand lines. I don't want to run each statement one by one and look at execution times. Is there a simple tool out there that runs the long anonymous script and gives me a simple tabular output (such as reads/writes/time taken to parse/execute)..

reddit.com
u/Odd_Part8454 — 1 day ago
▲ 13 r/SQLServer+1 crossposts

mssql-python 1.7.1 released — perf work, an SSH-tunnel hang fix, and a story about hitting the PyPI storage quota

We just shipped 1.7.1 of mssql-python, Microsoft's official Python driver for SQL Server.

What's in 1.7.1

  • UTF-16 string handling now goes through simdutf + std::u16string. Every string round-trip between Python and the native driver is meaningfully cheaper.
  • execute() hot path got a soft-reset + prepare-cache + guarded-diagnostics pass. Helpful for workloads doing lots of small statements.
  • connect() no longer hangs when your network path goes through an in-process SSH tunnel (paramiko + sshtunnel). Root cause was a SQLSetConnectAttr call holding the GIL while paramiko's transport thread needed it to forward bytes. Classic.
  • Login failures now raise a proper mssql_python exception type instead of a bare RuntimeError. (issue #532)
  • executemany no longer trips over decimal sign changes between rows.
  • VARCHAR CP1252 data now reads back the same on Windows and Linux. (issue #468)
  • manylinux_2_28 wheels so RHEL 8 / glibc 2.28 works out of the box.
  • macOS Python 3.10 gets a proper universal2 wheel now.

pip install -U mssql-python and you're done.

The PyPI side of the story

This release also hit the PyPI per-project storage quota. The driver bundles the Microsoft ODBC binaries for every supported OS / architecture / Python version, so the wheel matrix is large and growing. To make 1.7.1 fit, we removed the old 1.0.0-alpha and 1.x.x-beta wheels. None of those were recommended for production and the GA line supersedes them all, so if you were on one of those, time to move.

We're attacking the underlying problem from two directions in parallel:

  1. Splitting up the deployment so wheels carry less weight (likely by separating the bundled native binaries from the main wheel).
  2. A storage quota increase request with PyPI.

The quota bump is the short-term buffer; the split is the durable fix.

Links

Happy to answer questions about any of the perf work, the SSH-tunnel fix root cause, or the deployment-splitting plan in the comments.

reddit.com
u/dlevy-msft — 1 day ago
▲ 92 r/SQLServer+4 crossposts

Hi everyone,

I’m one of the maintainers of Portabase.I wanted to share a major update since my last post.

Repo: https://github.com/Portabase/portabase (Any star would be amazing ❤️)

Database migration is now built-in!

Previously, migrating meant:

  1. Download backup from the source DB
  2. Upload & restore it into the target DB

Now: no download, no upload, everything happens directly through the GUI.

It works with all supported databases, and migrations can be done within the same organization.

Quick recap if you’re new to Portabase:

Portabase is an open-source, self-hosted platform dedicated to database backup and restore. The web UI is designed to be simple and intuitive, to avoid hours of configuration. 

It uses a distributed architecture: a central server + edge agents deployed close to your databases. Works great when your databases aren’t all on the same network.

Currently supported databases: PostgreSQL, MySQL, MariaDB, Firebird SQL, SQLite, MongoDB, Redis and Valkey

What’s new since 1.11:

  • Migration feature (obviously)
  • Started working on Microsoft SQL databases (ongoing)
  • Launched a blog on the website for updates, guides, and news
  • Upgraded Next.js and dependencies to the latest versions

Feedback is welcome. Feel free to open an issue if you run into any bugs or have suggestions.

Thanks

u/Dizzy-Message543 — 2 days ago

PerformanceMonitor: Release v2.11.0 - All You Need Is Me

New and Improved

After a crazy travel week, hopping from NYC to Chicago to Poland and back home, I wanted to get out the little bibs and bobs that I had worked on while I was traveling. This is not a big huge groundbreaker of a release, but I'm happy that anything got done considering the craziness. Full release notes are below. Happy monitoring, you crazy kids.

github.com
u/DarlingData — 2 days ago

When do you use set rowcount instead of top?

Yesterday stumbled upon code at work - at the end of many SPs were set rowcount 0 despite it never being assigned before.

From quick googling, I found that Microsoft deprecates it for everything except select, but I am not sure why would you use it for select if top out there doing seemingly the same thing?

reddit.com
u/elephant_ua — 2 days ago

What are you using Elastic Jobs for today?

First off… thank you all for the responses on my SQL Server Agent post. Seriously, I learned a ton from that thread.

One thing that came up a few times was Elastic Jobs, and I realized I honestly don’t have a great feel yet for how people are using them in the real world today.

So now I’m curious…

What are you using Elastic Jobs for today?

  • Large scale maintenance?
  • Multi-tenant SaaS environments?
  • Cross-database orchestration?
  • Centralized job management?
  • Something completely different?

Also curious:

  • What problems do Elastic Jobs solve really well?
  • Where do they still fall short?
  • What made you choose Elastic Jobs over SQL Server Agent, Airflow, Kubernetes CRON jobs, PowerShell, etc.?

And of course…

If Microsoft handed you a magic wand for Elastic Jobs, what’s the first thing you’d fix?

Alright SQL community… educate Patrick. What’s really happening in production?

reddit.com
u/patrickGuyInACube — 3 days ago

PerformanceStudio: Release v1.11.0 - Taco Tuesday

Sometimes Taco Tuesday turns into Most Margaritas Monday and then you forget to post your release until Wet Brain Wednesday. Ah well. Some you win, some you lose.

A very special thank you to everyone who submits issues and contributes code. In this release, rferraton and ClaudioESSilva got some pretty cool new stuff in. The full change log is below, but the Query Store integration is quickly becoming the star of the show in a lot of ways. It's almost like a self-contained monitoring tool at this point.

There's a web version of the plan analysis portion of the app too. This is useful for people who want to give things a test drive, or who can't download an executable. The plan analysis is all client-side. You completely control whether and when the plan gets uploaded for sharing, and how long it remains available for. I have no interest in your XML unless you're paying me.

github.com
u/DarlingData — 3 days ago

Are there any plans or information regarding Database Mail with M365

I currently leverage Database mail with my on-prem SQL Server 2022.
I have it configured to send mail smtp.Office365.com over port 537 using basic auth.

I know Basic Auth is going away by the end of the year and curious to know if there are any plans to update this to handle modern auth or a service that accomplish this.

reddit.com
u/74Yo_Bee74 — 4 days ago

The beefiest server

For years, I worked as a DBA that had a handful of servers that would max out with 192 GB of ram on the main server with 12 cores and 128 gb of ram with 8 cores, all in a virtual environment.

But now, 2TB of ram, 32 cores, all phisical and plenty of them with many TB of data. In some ways, a more powerful server can mask issues

reddit.com
u/Better-Credit6701 — 4 days ago

Indexing strategy for a reporting table with historical snapshots

Hello, I have the requirement of making a report which stores historical snapshots. The snapshots are identified by a snapshot date, with each snapshot having data for 4 quarters.

The access pattern will always be a lookup by snapshot date and quarter, and then some filters on top of that.

Snapshots run 2x weekly and generate about 40,000 records each time. Only about 1m records per year. A safe assumption is that the will be kept for 5 years, so 5m records in this table.

I'm pretty new to SQL server and databases in general, but based on my research, I think a clustered index on the snapshot date and quarter would work well here as it would enable quick access to the data according to my usage patterns.

What do you think? Can anyone give more insight on this or good resources (I'm trying to build my knowledge to be able to make these decisions independently)?

reddit.com
u/Good_Skirt2459 — 4 days ago

Tips studying Postgres by a 11years DBA

Hello all. Im planning to start some Postgres study since my company is shifting to it. We are a giant tech, we have oracle sql Postgres informox across many teams , but it seems SQL became expensive ( yeah ) so they are moving to Postgres.

Im not excited losing my job so im trying to learn bit as always ,the beginning is super confusing .

Im going to study aurora, and since its more a RDS , what is close to SQL and what is different ?

Is th3 management the same as in SQL? Devs mebtion that Postgres is awesome ,but i jist could create an instance after 1 week (lots of permissions issues ).

Like backups , indexes,checkdbs, query tunning...is it all the same? Postgres people say yes, i thought its a little more complicated

reddit.com
u/duendeacdc — 4 days ago
▲ 6 r/SQLServer+1 crossposts

I need to use Microsoft SQL Server Express in MacOs

I just love MacOS in 2 weeks but not every software can be used in here. What is alternative way or or any third party that I can use to use this software. It just irritates me when invest this expensive laptop but need to back to windows

reddit.com
u/Historical-Bar-2058 — 5 days ago

SSMS GitHub Copilot QA

While using GitHub Copilot in SSMS, I came across a few questions.

First, when a user prompt is submitted, does the local SSMS client send the system prompt + task list together with the user prompt to the LLM server?

Or are the system prompt and task list added separately on the LLM server side during processing?

Second, where exactly is my query sent from SSMS?

Is it sent to the Azure cloud?

Or is there a separate GitHub server involved?

Additionally, if the query is sent to a cloud-based server, are the LLMs hosted and running on that server?

Or does that server call the APIs of each LLM model separately?

Lastly, when using Foundry Local, is there a way to check the maximum token limit for each model?

reddit.com
u/Old-Essay-5019 — 3 days ago

I am trying to build a multi subnet sql ag and listener not connecting

Hi

I am trying to build a multi subnet sql ag to upgrade/migrate an old sql, it's my first time and I am trying to build it based on how the existing ag are created in my employer environment.

So we have 2 azure vm each in a different subnet. Each vm has 2 nic, one for vm ip and another to hold the listener ip. This is how existing sql ag vm are configured.

I was somehow able to configure the listener but I am not able to connect to it from any other node other than ssms in primary.

I thought it would be a firewall issue and asked the firewall team to allow connection. But still it looks like it's not working.

NS lookup<listener> does give me both the listener ip but ping or test-netconnect the primary listener ip is failing.

I am able to connect to the primary sql instance via ssms on the secondary node but not with the listener

Can anyone suggest why this is happening ?

reddit.com
u/paultoc — 4 days ago
▲ 10 r/SQLServer+3 crossposts

Database monitoring utilities

We had some bugs in our web application and it led to bad data entering the database and eventually crashing our service. It was happening intermittently and had low priority so it wasn't patched quickly enough. To catch the errors I scripted a quick monitoring utility which ran the needed queries and compared the result sets. This became pretty useful so I created a more refined version and made it open source. It supports Postgres, SQL Server, MySQL and SQLite. Its also available as a docker image if you wanted to try it.

Source code: https://github.com/leoCorso/DBGuard-Web/releases/tag/1.0.0

Do you guys think something like this is useful? Are there any pitfalls or improvements you think of? Looking to improve the utility.

u/taohz — 4 days ago

sql database on other drive

Hi all,

New to sql express here. Playing around with failing permissions on a I need to install SQL Express and Management Studio. Although the default installation is on C:, I want my database files on another drive. So on my S: drive I created a database folder.

After installing, I tested it on my workstation and got permission errors.

Back on the server, I granted NT SERVICE\MSSQL$EXPRESS full permissions on that folder. But it is not showing the NT SERVICE\MSSQL$EXPRESS, just MSSQL$EXPRESS under security.

Back to the workstation. Running the software as an elevated administrator works. Standard users do not.

So back on the server: since the AD users are in a security group called Management, I created the same group (under security) in SQL Configuration Manager and assigned it the sysadmin role.

The software starts, but… it takes 30 seconds to open. Running it as admin is fast.

I think this is a permission issue with MSSQL$EXPRESS. Can anyone advice?

reddit.com
u/Dizzy-Pension314 — 3 days ago