not possible add Local Windows Account

  • Hello,

    is there in SQL 2019 some setting with not possible add local windows account or please has somebody idea what can be?

    I tried also big and small letter due to sensitive, but nothing helps

    tested also with the wizard and with the script. In wizard is not a problem to find this account and check names, but adding got also error

    USE [master]

    GO

    CREATE LOGIN [servername\windowslocalaccount] FROM WINDOWS WITH DEFAULT_DATABASE=[master]

    GO

     

    Msg 15401, Level 16, State 1, Line 4

    Windows NT user or group 'servername\windowslocalaccount' not found. Check the name again.

    thanks

    • This topic was modified 4 years, 3 months ago by  tony28.
    • This topic was modified 4 years, 3 months ago by  tony28.
    • This topic was modified 4 years, 3 months ago by  tony28.
  • one interesting issue.

    If i want to add some login which exists in windows like local account , I got also message The statement has been terminated behind this not found.

    If I tried add something what wasn't really exists, it wrote only not found.

     

     

  • Use the "Script" button from the wizard to determine what you are doing wrong. Pick a local account and then see what is scripted out.

  • Hi,

    yes, I did it, and still not possible. it looks the same like I found with the wizard.

    I tested

    • copy from windows user management to name in the wizard and click ok / without check name and got the error
    • find the name with the wizard in AD and then click ok / error
    • find the name with wizard and script then execute / error

     

    I don't have an idea what can be. I still think that it can be some local policy, that the windows team has set, but cannot directly find which one can be.

     

    Thanks

  • What account is running the SQL Server service?  It seems that this account does not have access to read the local system to retrieve the list of available users.

    Are you able to create a login from a windows domain account?  A sql login?

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Jeffrey Williams wrote:

    What account is running the SQL Server service?  It seems that this account does not have access to read the local system to retrieve the list of available users.

    Are you able to create a login from a windows domain account?  A sql login?

    Hi,

    SQL is running on a domain account. I tested to add this account to the windows administrator for testing, but nothing.

    Only what I can add is builtin\administrator or maybe some another builtin also ( didn't try ), but some already created or newly created local account is not possible.

    With Domain and SQL logins is no a problem.

    Totally don't have an idea what can be, only still thinking about some policy.

     

     

  • This was removed by the editor as SPAM

  • That is really strange. If it works from the wizard, but not from T-SQL.

    Is there some strange name? If the wizard, if you search, you can see local accounts, as in LocalPC\Bob? If you script and run the script without changes, it doesn't work?

     

  • If I do with wizard its looks normal working, without a problem, only got an error after click ok or with the script also.

    The name is the same like on other servers, servername\username.

    I have automatically script for this and due to some unknown reason was unsuccessful, but cannot find why.

    This issue is on 4 servers - 2AG from this domain. So this is the reason why I think will be some local policy. And also that I got this message after error message - The statement has been terminated

    Strange that during testing also service account was added to the Administrator and still is not working.

    • buildin\administrator possible add
    • current windows local account - ERROR
    • newly created windows local account - ERROR

    will test more maybe this week.

     

  • I forgot to mention, but I already found it

    It wasn't installed by me or our team, but some external consultant and he created some triggers for creating a login on the second node in AG, but is not working of course on local accounts 😀

    Ah, but finally solved 😀

    thanks all for ideas.

  • Thanks for the update. That's good to hear.

    Can you show the trigger code? Be interested on what was wrong specifically.

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply