Solved

SQL SERVER Enterprise Manager Login Name Blank

Posted on 2007-12-04
3
561 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now