Create New Sql Server Login / User

Sometimes you would like to create SQL Server account to be able access the specified database than just let it be accessed by computer local admin,  this case comes up when you would like to keep the application just only accessed the specified database only. This approach was the most recommended for better user management. Here are the steps

  1. In Security section of your Database Instance, expand the item Login until you find the existing MS SQL server account, right click choose new Login SQLServerLogin
  2. Specify for Login Name, Password, and Default Database that can be accessed by this account, as note, you should uncheck "User must change password at next login" LoginProperties
  3. After you followed the above instructions sequentially, then you should move to the Database that you point to, in this case was "Employee" database, expand on User menu, right click and choose New User, on field login name, choose the login that previously you have created "EmployeeAdmin", on user name field, I suggest you to type the same name with "Login Name"
  4. Give value for Schemas owned by this user to db_owner and Database role membership to db_owner, in this section you can customize the privilege consider to your need UserPriveledge
  5. After you follow all the instruction, please hold a moment, before everything take effect or in other words you can use your account to log in, you need to set the SQL Server instance to allow Sql Account Authentication.Similiar like this following ilustration. databaseinstance
    After that you should restart you MSSQL Server instance......, thanks.

0 comments:

Post a Comment