SQL Server authentication vs. Trusted connection

  • I maintain an application written years ago, where the database is on a Windows 2012 R2 Server and the database is SQL Server 2012. The people who configured this application made it so that it used SQL Server Authentication. I've always taken it to be the case that SQL Authentication was the only way of accessing the database. I'm in a friendly dispute with a fellow developer, who believes that a SQL Server configured to only accept SQL Authentication can accept a user connecting to it via a .NET application, if the application uses trusted connections.

    I didn't believe it, but thought I would ask an AI chatbot about it. I was surprised that the bot said it was possible to programmatically connect to a SQL Server database using trusted connections, even though the database is only configured to accept SQL Authentications.

    So, I thought I would ask here, because I know that GenAI can hallucinate. So, is it possible to programmatically connect to a SQL Server 2012 database using trusted connections, when that database is configured to only use SQL Authentication?

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Your choices are:

    • Windows Authentication, or
    • SQL Server and Windows Authentication (aka 'Mixed Mode')

    There no such thing as 'SQL Server only' authentication.

    Eddie Wuerch
    MCM: SQL

  • of course, you can also have a server level login trigger that bounces Windows Authenticated connections

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Eddie Wuerch wrote:

    Your choices are:

    • Windows Authentication, or
    • SQL Server and Windows Authentication (aka 'Mixed Mode')

    There no such thing as 'SQL Server only' authentication.

    Oh, OK. I thought there was both "SQL Server Only" and "SQL Server Authentication and Windows Authentication". Thank you for correcting me.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Yep, always trusted connections (if you have a login of some sort) and optionally user/pwd auth.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply