question

sgonza2975 avatar image
sgonza2975 asked

Create Login

Create Login [\TestAccount} from Windows Go That's the command I'm using to create a login, however, I keep getting, **"msg 15401, level 16, state 1, line 1 windows nt user or group '\TestAccount' not found. Check the name again".** Error. I created a new user Called TestAccount under the computer management, so the user is there.
sql-server-2008logincreate
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·
You've got a `}` instead of a `]` there - is that in your script, or just a typographical / transcription error?
0 Likes 0 ·
Blackhawk-17 avatar image
Blackhawk-17 answered
Try tweaking it as: CREATE LOGIN [ComputerName\TestAccount] FROM WINDOWS; GO
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

skpani avatar image
skpani answered
Verify that the Windows login still exists in the domain. Your network administrator may have removed the Windows login for specific reasons, and you may not be able to grant that login access to the SQL Server. Syn: `Create Login [ComputerName\Loginname] from Windows`
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.