Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


orphaned users in sql server


orphaned users in sql server

Author
Message
reddisqldba
reddisqldba
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 13
hi this is reddi Krishna i created a new login at server level and mapped to user level permissions after i have executed the below command

select *from sys.sysusers and select *from sysusers

by executing both these commands i got the same sid no. after i deleted the login which i had created server level login. after i execute the following command

sp_change_users_login 'report'

by executing this command i got below created user name and sid.

nikil 0x191792319FBF2A4788077A5F20567D7D

so,from this what can i do for getting identification of orphaned users
please reply as early as possible
HanShi
HanShi
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3049 Visits: 3633
Start by reading about the "sp_change_users_login" at http://msdn.microsoft.com/en-us/library/ms174378.aspx

The option 'report' has resulted in a list of users within the current database that do not have a link to a login. By using the 'auto_fix' or the 'update_one' option, you can (re-)establish this link.
exec sp_change_users_login 'auto_fix', 'nikil'



** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
colin.frame
colin.frame
SSC Veteran
SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)

Group: General Forum Members
Points: 236 Visits: 320
Alternatively, you could transfer the logins and passwords from the original server to the target server. This can have the advantage of not having to deal with orphaned users after a database has been restored to a different server. It involves creating a couple of stored procedures in the original server's master database - see article http://support.microsoft.com/kb/918992 for details.

--Colin Frame
SQLAli
SQLAli
SSC-Enthusiastic
SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)

Group: General Forum Members
Points: 123 Visits: 270
After executing the below 1st command, we got the list of orphan logins, it listed out and i selected one of the users to auto_fix. But unfortunately it throws below error. Hope we also need to give the password to fix this. If any one has complete knowledge could you share?
sp_change_users_login 'report'

sp_change_users_login 'auto_fix', 'kumar'

Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 214
An invalid parameter or option was specified for procedure 'sys.sp_change_users_login'.


Thanks,
I’m nobody but still I’m somebody to someone………….
christopher.gray
christopher.gray
Valued Member
Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)Valued Member (60 reputation)

Group: General Forum Members
Points: 60 Visits: 186
The most likely reason is no login named "Kumar" exists, so the [sp_change_users_login] proc can't successfully un-orphan the user.

See if you have a login named 'kumar'. If not, create one and try the auto_fix again.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search