Fixing a typo in machine name
Posted
by
justSteve
on Server Fault
See other posts from Server Fault
or by justSteve
Published on 2010-12-24T13:04:13Z
Indexed on
2010/12/24
13:55 UTC
Read the original article
Hit count: 288
sql-server-2008
When i installed windows i had a typo in the machine name that i corrected from the system's 'Computer Name/Domain Changes' - the workstation is a member of a workgroup not a domain. From everything i can see the renamed machine name is correct.
Shift gears.... I'm importing SQL logins from my remote server to this, my development workstation and have used the script presented here - a script that generates a CREATE statement for each login found. While I was preparing to run this script's output (from the remote box) i needed to change the domain name from the remote to my local's name - so i ran the same script locally (in order to see what SQL things my domain name is.
SQL has the original machine name - the one with the typo. However, the scripts are tossing errors if i try to create logins with that identifier.
CREATE LOGIN [Setve\Admin] FROM WINDOWS WITH DEFAULT_DATABASE = [master]
But works correctly if i use the updated machine name: CREATE LOGIN [Steve\Admin] FROM WINDOWS WITH DEFAULT_DATABASE = [master]
So the problem is: do i have a problem i need to solve? Somewhere, deep in the guts of SQL Server, it has record of a Domain name that does not exist. Should i find and fix that discrepancy?
thx
© Server Fault or respective owner