Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sp_addlogin

Author  Topic 

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 18:08:46
i just want the user have the ability to do sp_addlogin.
pls help me

i successfully ran this query
grant execute on sp_addlogin to userLogin

but when i login with userLogin. It wont work

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 18:16:02
You need to grant the securityadmin fixed server role. Check BOL for details.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 18:21:20
if i grant the role. the user can perform sp_addlogin and more..i dont want that
just want sp_addlogin. pls...PLS
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 18:26:47
From SQL Server Books Online:
quote:

Only members of the sysadmin and securityadmin fixed server roles can execute sp_addlogin.



Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 18:28:03
I miss read that thanks again.
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 19:54:48
I'm writing a few SP to have the users the ability to add login, add & remove db users and update login passwords.

In order to perform sp_grantdbacces, db user must have db level permission db_accessadmin. If I want to perform sp_grantdbacces on all the DB. Do I need to grant db_accessadmin to db user on all the DB? Any shorter route?
Thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 20:30:04
Yes you need to grant it on all of the intended databases.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 20:36:43
i knew before asking the question. just wanted to make sure.
and i dont wanna grant sysadmin permission.

This sucks.
Go to Top of Page
   

- Advertisement -