Solved

SQL SERVER Enterprise Manager Login Name Blank

Posted on 2007-12-04
3
564 Views
Last Modified: 2008-02-01
In SQL Server Enterprise Manager > Database > (Database Name) > users
I have a user that has a blank LOGIN NAME.  I need to associate this with one of our domain accounts.  

At one point in time this Database user was associated with a domain account.  The domain account was deleted at one point.  Since then I recreated the account and would like to reassociate the db user with this nt account.  

I tried deleting the user on the database level and readding by going to Enterprise Manger > Security.  It adds the user ok but the LoginName still turns out blank.
0
Comment
Question by:9413systems
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Chris Mangus earned 500 total points
ID: 20407140
You also need to delete the user at the database server level...Enterprise Manager > Security.  Then, re-add the account.

If you delete a domain account and don't take it out of SQL Server it will be an orphan account.  SQL Server matches domain account on the SID, not the user name.  If you create a new account on your domain with the same name as the old one it gets a new, unique SID.
0
 
LVL 1

Author Comment

by:9413systems
ID: 20407187
Is there any way to associate a orphan account with a new windows account??
0
 
LVL 17

Assisted Solution

by:Chris Mangus
Chris Mangus earned 500 total points
ID: 20407236
For SQL logins, yes, for domain logins, no.  For domain accounts you always have to drop and recreate the account in SQL Server because of the SID issue.

With SQL logins you'd use sp_change_users_login 'AUTO_FIX','username'
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question