• Home
  • Content
  • RSS
  • Log in

Password Recovery

Provide useful password recovery tricks, guides and software
  • Home
  • Password Recovery Bundle
  • Reset Windows Password
  • Product Key Finder
  • Protect My Folders

Difference Between SQL Server Logins and Database Users

February 6, 2015 updated by Admin Leave a reply »

Although the words logins and users are often used interchangeably, they are very different things in Microsoft SQL Server. There has always been confusion over logins and users, especially for most new SQL Server users. Here I’ll explain the difference between SQL Server logins and database users.

Part 1: Logins vs. Users

Logins are created at the server level, while users are created at the database level. In other words, a login allows you to connect to the SQL Server service (also called an instance), and permissions inside the database are granted to the database users, not the logins. The logins will be assigned to server roles (for example, serveradmin) and the database users will be assigned to roles within that database (eg. db_datareader, db_bckupoperator).

Logins must be mapped to a database user to connect to a database. If your login is not mapped to any database user, you can still connect to SQL Server instance using SQL Server Management Studio (SSMS), but you’re not allowed to access any objects in the database. To access any objects in the database, you must have a login that’s mapped to a user in the database, and that user must be granted appropriate rights in the database.

The database user does not have credentials of its own and relies on the server login for authentication. This means that there is no password associated with a database user. Below we’ll walk you through the steps of creating a new login and user, mapping a user to a login.

Part 2: Create A New Login

To create a SQL Server login, please follow these steps:

  1. Open SQL Server Management Studio and connect to your SQL Server instance.
  2. In the Object Explorer panel (located on the left side), expand the server where you want to create a new login. Expand the Security option, right-click on Logins and then select New Login.

    sql-server-login

  3. In the Login – New dialogue that appears, enter a new login name. In this example, I create a new login named jack and choose SQL Server authentication. Uncheck the box labeled “User must change password at next login”.

    new-sql-server-login

  4. Click OK to create a new SQL Server login.

Till now I haven’t set up User Mapping for the new login jack, so there is no database users mapped to this login currently. You can check out this at the Login Properties window by right-clicking the newly-created login and select Properties.

no-user-mapping

I can then use SQL Server Management Studio to connect to the SQL Server instance with this login. But when I try to expand the database test, I got the following error message due to lack of database permissions.

cannot-access-database

In order to get access to a specific database, we need to create a new database user and map it to the login jack.

Part 3: Create A New User

To create a database user, please follow these steps:

  1. Open SQL Server Management Studio and connect to your SQL Server instance.
  2. In the Object Explorer panel (located on the left side), Expand the database in which to create the new database user.
  3. Expand Security and then Users. Right-click on Users and then select New User.

    sql-database-user

  4. In the Database User – New dialogue that appears, select SQL user with login from the User type list, and enter a name for the new database user.

    new-sql-database-user

    In this example, I create a new database user named jack_user, and set jack as the Login name as I want to map this database user to the login jack I created previously.

  5. Click OK to create the user.

Once the database user is created, check out the Login Properties for the login jack and you’ll find the database user jack_user is now mapped to the login.

user-mapped-to-login

At this time you can connect to the SQL Server service with the login jack, and expand the database test without permission issue.

gain-database-access

That’s it! I hope this article would be helpful for you to understand the difference between a login and a user in SQL Server.

Related posts:

  • SQL Server Management Studio Saved Password
  • How to Reset Forgotten SA Password without Stopping SQL Server Instance
  • How to Enable Remote Connections in SQL Server 2014/2012/2008
  • How to Login to SQL Server If SA Account Is Disabled

  • Previous Post: 5 Methods to Open File Explorer in Windows 10 / 8.1 / 8
  • Next Post: How to Convert DMG Image to ISO format in Windows

Posted in SQL Server, Tips & Tricks

Tags: create sql server login sql server create new user sql server login user mapping sql server login vs user

    • Subscribe Subscribe to my blogs feed
    • Previous Entry 5 Methods to Open File Explorer in Windows 10 / 8.1 / 8
    • Next Entry How to Convert DMG Image to ISO format in Windows
  • Links
    • Forgot Windows Password
    • Outlook Password Recovery
    • Password Recovery Bundle
    • PDF Password Recovery
    • Product Key Finder
    • Protect My Folders
    • Recover iTunes Password
    • SQL Server Password Changer
  • Categories
    • Active Directory Password
    • Free Software
    • Mac
    • Others
    • Product Key
    • Software News
    • Software Reviews
    • SQL Server
    • Tips & Tricks
    • Video Converter
    • Windows 10
    • Windows 11
    • Windows 7
    • Windows 8
    • Windows Vista
    • Windows XP
  • Recent Posts
    • Easy Ways to Turn on ‘Do Not Disturb’ on Windows 11
    • Fix: Unable to remove the Virtual Touchpad icon in Windows 11
    • Fix: Remote Desktop Frequently Disconnects after Windows 11 Update
    • How to Disable Notepad AI Rewrite in Windows 11
    • How to Remove “Edit in Notepad” Context Menu in Windows 11
  • Archives
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    • September 2024
    • July 2024
    • June 2024
    • May 2024
    • April 2024
    • March 2024
    • February 2024
    • January 2024
    • December 2023
    • November 2023
    • October 2023
    • September 2023
    • August 2023
    • July 2023
    • June 2023
    • May 2023
    • April 2023
    • March 2023
    • February 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
  • Tags
    Active Directory bypass windows password crack windows password delete windows password forgot active directory password forgot administrator password forgot domain administrator password forgot laptop password forgot outlook password forgot outlook pst password forgot sql server password forgotten windows password forgot windows 7 password forgot windows 8 password forgot windows 8 tablet password forgot windows administrator password forgot windows login password forgot windows password forgot windows xp password hack windows password HP windows 8 password reset lost windows password password password reset disk pdf password recovery recover firefox password recover windows 7 product key recover windows password remove pdf restrictions remove windows password reset domain administrator password reset sql server password reset windows 7 password reset windows 8 password reset windows 8 tablet password reset windows administrator password reset windows login password reset windows password reset windows xp password UEFI BIOS windows 7 windows 8 windows password recovery windows password reset disk windows server 2008

Back to Top

© 2025 top-password.com. Proudly powered by WordPress.