Solved

SQL SERVER Enterprise Manager Login Name Blank

Posted on 2007-12-04
3
559 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

771 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

11 Experts available now in Live!

Get 1:1 Help Now