Categories: SQL Server

Restarting SQL Server after adding a new SQL login

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.


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

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.

Recent Posts

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

I'm hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM UTC.…

5 days ago

dataMinds Connect 2024 – Session Materials

The slides and scripts for my session "Tackling the Gaps & Islands Problem with T-SQL…

4 weeks ago

Connect to Power BI as a Guest User in another Tenant

Sometimes your Microsoft Entra ID account (formerly known as Azure Active Directory) is added as…

2 months ago

How to use a Script Activity in ADF as a Lookup

In Azure Data Factory (ADF, but also Synapse Pipelines and Fabric Pipelines), you have a…

4 months ago

Database Build Error – Incorrect syntax near DISTINCT

I wrote a piece of SQL that had some new T-SQL syntax in it: IS…

4 months ago

Speaking at dataMinds Connect 2024

I'm very excited to announce I've been selected as a speaker for dataMinds Connect 2024,…

5 months ago