all groups > sql server programming > september 2006 >
You're in the

sql server programming

group:

add a new user to SQL


Re: add a new user to SQL Tom Moreau
9/16/2006 3:12:53 PM
sql server programming:
Add the login to the seecurityadmin role. This allows you to create logins.
If you then want the person to add users to a database, add him/her to the
database's db_securityadmin role.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
..
[quoted text, click to view]
Hi,

I want my client application to be able to create new SQL users, however
this seems to be a function only the SA can perform.

There there some sort of permission or role that I can have a user be apart
of that will have the perms to do this ?


add a new user to SQL Aussie Rules
9/16/2006 8:04:07 PM
Hi,

I want my client application to be able to create new SQL users, however
this seems to be a function only the SA can perform.

There there some sort of permission or role that I can have a user be apart
of that will have the perms to do this ?


Re: add a new user to SQL Erland Sommarskog
9/16/2006 10:17:45 PM
Aussie Rules (AussieRules@nospam.nospam) writes:
[quoted text, click to view]

If you are on SQL 2005, you can put the stuff in a stored procedure
that you sign with a certificate. The you associate a login with that
certificate, and grant that login the required permissions. Note that
a certificate login is virtual - it cannot log in for real.

I have a long article that discusses this method in detail, see
http://www.sommarskog.se/grantperm.html.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Building a cPanel/WHM and servers... Antoine Banks
9/17/2006 6:59:30 PM
Where can l find free online tutorials to learn how to build cPanels/WHMs, and ANY web server? I've basically been wanting to learn how to build my own cPanels/WHMs, and servers in ANY programming language, database formats, operating systems, etc that I want, for the longest time, with any feature that I want to add to the cPanel/WHM and servers of mine to use.

Plus, it'll help me so if there are features that I want, and other cPanels/WHMs and servers don't have, then I could build it for myself to use on my personal cPanel/WHM and server. Also, with how expensive cPanels/WHMs and servers are, it's cheaper to build my own for myself. Thanks in advanced.

From http://www.developmentnow.com/g/113_2006_9_0_0_822415/add-a-new-user-to-SQL.htm

Posted via DevelopmentNow.com Groups
RE: add a new user to SQL stcheng NO[at]SPAM online.microsoft.com
9/18/2006 3:07:21 AM
Hi Aussie,

Since adding or altering SQL Server logins is a high privilege operation on
a SQL server instance, it will require powerful user privileges. Are you
using SQL Server 2000 or SQL Server 2005?

For SQL Server 2000, you can use the sp_adduser to create new server login.
And as Tom said, you need to have "Sysadmin" or "securityadmin" server
fixed role in order to execute this system stored procedure.

#sp_addlogin
http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_adda_0q7i.asp?frame=tr
ue

For SQL Server 2005, it is recommended that you use the new "Create Login"
function to create new server logins. (sp_adduser is planed to be removed
in future version of SQL Server). And for this function, in addition to
grant the executing user "sysadmin" or "securityadmin" server role, you can
grant him the "ALTER ANY LOGIN" permission instead. You can see the
detailed security description in the followign BOL reference.

#CREATE LOGIN (Transact-SQL)
http://msdn2.microsoft.com/en-us/library/ms189751.aspx


You can grant SQL Server permissions to certain login through the
management studio or the following T-SQL means:

#GRANT Server Permissions (Transact-SQL)
http://msdn2.microsoft.com/en-us/library/ms186717.aspx

Hope this helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button