At a project, we asked if we could get a SQL Server login/user so we could make a connection from an Apache Airflow pipeline to the SQL Server instance. The answer was: “No, because then we would need to restart the server”. This sounded a bit strange, because I’ve never had to restart the SQL Server instance to add a new user.
I double checked on Google and I couldn’t find any info on why you should need to reboot the server. I asked on Twitter, and even no-one of the #SQLFamily could find a reason. I was starting to question the sanity of the admins at the project. However, after a quick discussion we finally discovered the reason why:
SQL Server authentication was not enabled on the instance.
The default authentication mode when installing SQL Server is Windows Authentication only:
If you want SQL Server authentication, you need to explicitly enable it during set-up (so no next-next-finish). In this case, it wasn’t the case. You can switch to mixed mode later on, but you might’ve guessed it: this requires a restart of the SQL Server instance.
All this learned me one important lesson: when someone gives you a surprising answer, don’t make assumptions. They probably have a good reason.
I'm hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM UTC.…
The slides and scripts for my session "Tackling the Gaps & Islands Problem with T-SQL…
Sometimes your Microsoft Entra ID account (formerly known as Azure Active Directory) is added as…
In Azure Data Factory (ADF, but also Synapse Pipelines and Fabric Pipelines), you have a…
I wrote a piece of SQL that had some new T-SQL syntax in it: IS…
I'm very excited to announce I've been selected as a speaker for dataMinds Connect 2024,…
View Comments
My understanding is SQL authentication is inherently less safe than using Windows Login. With SQL Authentication anyone can log in from anywhere as long as they are able to contact the server.
Your last sentence is also the reason why it's sometimes useful to have SQL authentication. If AD is down, you can still log in to your server.