RE: Adding a new login

RE: Adding a new login

 

  

You make the target database your current database, then run the procedure.

USE myDatabase
EXECUTE sp_grandbaccess blah, blah, blah



From: Guzman
Sent: Wed 31-May-06 17:21
To: LazyDBA Discussion
Subject: RE: Adding a new login


sp_grantdbaccess doesn't specify which database your added the member
too, how do I do that? I think I want to use sp_addrolemember also, but
again, it doesn't specify database. How do I tell it?


------------------------------------------------------------------




sp_grantlogin
sp_grantdbaccess



From: Guzman
Sent: Tue 30-May-06 19:38
To: LazyDBA Discussion
Subject: Adding a new login


I would like to add a new user to my server and database through stored
procedures, and I know it can be done, but how?

I've been playing with the master database sp_addlogin, then thought I
would run sp_addUser after that, but how do you add a login for a
trusted connection? I don't have the password, because I just import
them from the domain. Which sp do I use to import from a domain?
Running sp_adduser should work after that.

Dan


------------------------------------------------------------------
Daniel Guzman
Western Coastal EMAP Data Manager
Computer Sciences Corporation, c/o U.S. EPA
Coastal Ecology Branch
2111 S.E. Marine Science Center Drive
Newport OR 97365-5260
(541)867-5033, FAX (541)867-4049



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

MS Sql Server LazyDBA home page