SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 
        
Home       Members    Calendar    Who's On



Orphand users problem Expand / Collapse
Author
Message
Posted Thursday, July 02, 2009 4:11 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 1:52 AM
Points: 264, Visits: 800
Hi,

We have a prodution sql server 2000 and have only 2 Logins(SQL logins No windows logins) ABC and XYZ. We have 5 databases and in each database has 8 users and more(database->security->users), out of these 8 users, 2 users are ABCand XYZ and other 6 users as below:

scott, Jim, smith,alex, andrew and peter.

I did not understand how these users were created without having Logins related to that users?

Is this possible to create Users without creating Logins?

We have upgrated this sql server 2000 to 2005 and I used sp_help_revlgin procedure to script out the logins and ran the generated output in sql server 2005.

I checked for the Orphend users by executing sp_change_users_login 'report' in each database

and in every database, user smith resuted as Orphend user.

and in one databse, user XYZ (which is a login)is also resulted as Orphend user.

How to fix these orphend users problem??
Post #746690
Posted Thursday, July 02, 2009 4:59 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 12:19 PM
Points: 1,261, Visits: 1,501
There are a couple of other actions that sp_change_users_login can use besides report... these just happen to fix the orphaned user. Check out BOL for the procedure.

Wayne
For better assistance in answering your questions, click here
For performance problems, please read this.
Post #746698
Posted Friday, July 03, 2009 11:47 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 04, 2009 3:05 AM
Points: 46, Visits: 197
First, make sure that this is the problem. This will lists the orphaned users:

EXEC sp_change_users_login 'Report'

If you already have a login id and password for this user, fix it by doing:

EXEC sp_change_users_login 'Auto_Fix', 'user'

If you want to create a new login id and password for this user, fix it by doing:

EXEC sp_change_users_login 'Auto_Fix', 'user', 'login', 'password'

Hope u got the info..

Reply me if u don't get the solution

all the best..txtPost_CommentEmoticon('');
Post #747151
Posted Saturday, July 04, 2009 1:46 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 5:41 AM
Points: 1,698, Visits: 2,267
Mani (7/2/2009)

I did not understand how these users were created without having Logins related to that users?

Is this possible to create Users without creating Logins?


This happens usually when you restore a database. Remember that logins are stored in the master database where as user IDs are stored in the user databases. When you restore a database, the user ids stored in the database are restored where as their respective logins are still missing from the master database.

Previous posts clearly states on how to resolve the issue using sp_change_users_login.






Pradeep Singh
Post #747167
« Prev Topic | Next Topic »


Permissions Expand / Collapse