Add a domain login in SQL Server

In order for a domain user to connect to the SQL Server database, you must create a login in SQL Management Studio. Once the login is created, you must assign roles and access to the RKM database.

Procedure 

Log on to Microsoft SQL Server

  1. Log on to Microsoft SQL Server Management Studio.

Add a login for the domain account

  1. Under Object Explorer, right-click the Security folder.

  2. Click New > Login.

  3. In the Login - New window, on the General tab, enter the Login name in <domain>\<account> format.

  4. Click OK.

Run alter authorization query

  1. Click the New Query button.

  2. Enter the following query against the RKM database to alter authorization from the RKMUSER account to the domain account.

    ALTER AUTHORIZATION ON DATABASE : : RKM TO “<domain>\<account>”

    ALTER AUTHORIZATION ON DATABASE : : RKM TO “lab\rs”

  3. Click the !Execute button.

Assign server roles

  1. Expand Security > Logins.

  2. Right-click the account you just added, and then click Properties.

  3. Under Select a page, click Server Roles.

  4. Select the dbcreator and public server roles.

Verify the alter authorization query ran successfully

  1. Under Select a page, click User Mapping.

  2. Under Users mapped to this login, verify the Map check box is selected for the RKM database. If selected, it verifies the ALTER AUTHORIZATION query ran successfully.

  3. Click OK.

  4. Exit SQL Server Management Studio.