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
 Adding a New User

Author  Topic 

olay80
Yak Posting Veteran

62 Posts

Posted - 2006-03-28 : 10:22:48
hey guys,

i'm trying to add a new user to a certain database directly through the users section in this database, but i was given an error that i can't and nothin was added, so i tried adding this user from the Logins section, a pop up message showed saying that this user already exists knowing that it doesn't when i try to create a user from the Logins in a different username it worked but the problem is i can't change the user i must stick with the username that is not working.
how can i fix it??

Thanks,
Oliver

nr
SQLTeam MVY

12543 Posts

Posted - 2006-03-28 : 10:43:44
select * from master..syslogins.
Look at the sid for this login.
In the database
select * from sysusers
Find the entry with that sid and also with the username you want to add. Drop both of them (using sp_dropuser).
Now it should let you add the user.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -