Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
Website builder

SQL Server - Create a Login

Note that this tutorial was written for those using the 2000 edition of SQL Server (SQL Server 2000). For later versions of SQL Server, check out the SQL Server 2008 tutorial.

In the previous lesson about SQL Server security, we learned that SQL Server allows for the creation of different logins for different users. These logins can be assigned to any number of roles, depending on the access that user is entitled to.

In this lesson, we will walk through the steps in creating a login.

To Create a New Login

  1. Using Enterprise Manager, expand the "Security" option and right click on "Logins"
  2. Click on "New Login"
    Creating a new login in SQL Server

    Tip: You can bypass the above steps by clicking on the "New Login" icon New login icon in the top menu

  3. Complete the Login Properties in the "General" tab by providing a name for the login, choosing the Authentication method (providing a password if you choose "SQL Server Authentication"), and selecting the database to use as a default. If you don't choose language, it will use the default for the current installation of SQL Server.
    SQL Server Login Properties - General tab
  4. Click the "Server Roles" tab if you need to apply any server-wide security privileges.
    SQL Server Login Properties - Server Roles tab
  5. Click the "Database Access" tab to specify which databases this login is allowed to access. By default, the login will be assigned to the "Public" role, which provides the login with basic access. If the login needs more access in one or more databases, it can be assigned to another role with greater privileges.

    Note that these roles are "Database Roles" and are different to the Server Roles in the previous tab. Server Roles are for administering the SQL Server. Database Roles are created within each database and specify what the login can do within that database.

    SQL Server Login Properties - Database Access tab

Enjoy this page?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!