Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Login creation failed


Login creation failed

Author
Message
jitendra.padhiyar
jitendra.padhiyar
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 669
Hello Master,

My client created a local non domain windows account and now they want me to add that acount on SQL Server and want sysadmin rights. My SQL Server is in domain on that machine. While creating user, I am able to search that account (As it is local machine account) but I am not able to create login for the same. I got an error :

"Error 15401: Windows NT user or group '%s' not found".

Is it necessary that new login should be in domain ? OR how can I create login for Nondomain(local account) account ?
jitendra.padhiyar
jitendra.padhiyar
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 669
Yeah..!! Smile I did it.

I was trying to create user with "Windows authentication" as it was local user, I was getting error. I tried with "SQL Server Authentiacation" and it works..!!

Huh, I did it. Smile
SQLDuck
SQLDuck
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 Visits: 330
The SQL login you created isn't associated with the local Windows account. You've created a stand-alone login within SQL, which is why it asked you to create a new password instead of using the password of your Windows user. Here is a script that will create the login, and then add it to the 'sysadmin' server role.

USE [master]
GO
CREATE LOGIN [MyDBServer\LocalAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
EXEC sp_addsrvrolemember 'MyDBServer\LocalAccount', 'sysadmin'
GO
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search