2

I am not so much expertise in SQL Server.

I had created an application that uses SQL Server as its backend which connects on Windows authentication.

Now, I want to create a user id and password that should be used to access that database. And no one should have access through Windows authentication mode. Also I don't want to disable windows authentication mode.

Kindly suggest

2
  • I don't think you can enable both. Commented Aug 6, 2016 at 11:50
  • you can DISABLE usre ALTER LOGIN [Domain\username] DISABLE but not a good approach and create user msdn.microsoft.com/en-us/library/ms173463.aspx Commented Aug 6, 2016 at 12:19

2 Answers 2

4
  1. Open SQL Server.
  2. Expand your SQL Server instance.
  3. Expand Security folder
  4. Expand Logins folder

Here you can set which users can login to SQL Server. You can delete all the existing users and create new ones with custom passwords.

Sign up to request clarification or add additional context in comments.

Comments

3
  • In SQL Server Management Studio, right click on the server instance.
  • Select 'Properties'.
  • In the Server Properties window go to the 'Security' section.
  • You can enable both Windows and Server authentication here under 'Server authentication'.
  • Click 'OK'.

You can now create a login for the database under 'Security > Logins'

  • Right click on 'Logins'.
  • Select 'New Login'.
  • In the 'Login - New' window under the 'General' section fill out a login name. Select the 'SQL Server authentication' option and create the passwords. I usually uncheck all the checkboxes here (Enforce password policy, expiration and change at next logon).
  • Go to the 'User Mapping' section.
  • Check the databases you want this user to have access to.
  • In the 'Database role membership' panel, select the roles for the user (most of the time I just use public and db_owner).
  • Click 'OK'

You cannot disable the Windows authentication. Otherwise not even an Administrator would have access.

1 Comment

I don't want to disable windows authentication mode. I just want to have my database to be secured with a password, so that it can ONLY be accessable by that particular password nor even access by using windows authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.