Search code examples
windows-7-x64sqlpackage

NT AUTHORITY\Local account Issue with SQLPackage.exe on Windows 7


We have been using SQLPackage.exe file from installer to deploy LocalDB V11.0 on various OS.

While this is working fine for Windows 8.1 and Window 2012 R2, we keep getting below error when we tried from Windows7.

Error SQL72014: .Net SqlClient Data Provider: Msg 15401, Level 16, State 1, Line 1 Windows NT user or group 'NT AUTHORITY\Local account and member of Administra tors group' not found. Check the name again. Error SQL72045: Script execution error. The executed script: CREATE USER [NT AUTHORITY\Local account and member of Administrators group] FOR LOGIN [NT AUTHORITY\Local account and member of Administrators group];

We are not sure what we are missing here, Anyone got any idea?


Solution

  • While there can be many reasons why you are getting above exception, I am listing one of them as below, please check if it helps you.

    Step1: Information: This error can occur when DACPAC / BACPAC files may try to create the user by

    default using below sql script:

    CREATE USER [NT AUTHORITY\Local account and member of Administrators group] FOR LOGIN [NT AUTHORITY\Local account and member of Administrators group]
    

    Step2: On command prompt, please use the below command to check whether you have

    "NT AUTHORITY\Local account"

    and

    "NT AUTHORITY\Local account and member of Administrators group"

    groups created,

    Whoami /all
    

    Please refer the below URL which explains this issue in detail.

    http://woshub.com/blocking-remote-network-access-for-local-accounts/

    Step3: If you do not find the groups created, then you need to install the KB as mentioned in the same

    URL. Below is the URL where you can find the KB for win7.

    https://www.microsoft.com/en-in/download/details.aspx?id=42745

    Hope this helps.