I am wondering how can someone change the sqlserver authentication mode by just a script?
I need a script to run in query window and change the authentication to mixed mode with it.
Any idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For Windows only mode:
Use
2instead of1for mixed authentication.You’ll have to restart SQL Server after changing this setting. You can’t do that from T-SQL. From the command prompt, it’s something like
net stop mssqlserverthennet start mssqlserver.