|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Automatic creation of database users and logins
I am working on a project where we are trying to automate user, login id creation for a database, based on their network (Windows 2000) id. When we create a new employee record, a database user (and a login if required) should be created in the database and allocated to a particular role. Adding a user to a role is fine. Is there a way to create a login and/or database user automatically (by running an SP or something like that)
Thanks in advance Raj |
|
#2
|
|||
|
|||
|
I think you could use the system stored procedure sp_addlogin, and sp_addrolemember to attach this user to a role.
Hope this helps
__________________
- Rogier Doekes |
|
#3
|
|||
|
|||
|
You could also use Windows Authentication in SQL Server.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Automatic creation of database users and logins |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|