SQL Clone
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 (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 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
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4380 Visits: 3668
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
Old Hand
Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)Old Hand (309 reputation)

Group: General Forum Members
Points: 309 Visits: 342
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.

Forum Etiquette: How to post data/code on a forum to get the best help
Make sure that you include code in the appropriate IFCode tags, e.g. [code=sql]<your code here>[/code]. You can find the IFCode tags under the INSERT options when you are writing a post.
SQLAli
SQLAli
SSC-Enthusiastic
SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)

Group: General Forum Members
Points: 173 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
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 194
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