loads of useful information, examples and tutorials pertaining to web development utilizing asp.net, c#, vb, css, xhtml, javascript, sql, xml, ajax and everything else...

 



Advertise Here
C-Sharpener.com - Programming is Easy!  Learn Asp.Net & C# in just days, Guaranteed!

Creating a new limited user for your SQL 2005 instance

by naspinski 10/21/2008 7:20:00 AM

Simplified instructions to add a limited access user to your instance

To make a new login/user, run the sql:
CREATE LOGIN loginName
  WITH PASSWORD = 'some_password';
USE name_of_db_to_use;
CREATE USER userName FOR LOGIN loginName;

Often times, loginName is the same as userName.


  • Once that is made, right click on the login you just made is SQL Management Studio under Security->Logins and click properties.
  • Now click on User Mapping on the left and check the box next to what DBs you want the user to have access to.
  • Also, check the box next to what permissions you want the user to have, the following will give user ability to create/read/write/delete/edit tables:
    • db_datareader
    • db_datawriter
    • db_ddladmin

Always remember to give as limited a permissions set as possible!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

sql

Related posts


Comments are closed