question

ChrisStamey-9421 avatar image
0 Votes"
ChrisStamey-9421 asked ChrisStamey-9421 answered

Login failure for domain\Machine$

I am dealing with the infamous "Login failed for user 'domain\machinename$'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]"

After searching the internet I have tried adding "NT AUTHORITY\NETWORK SERVICE" with db_DataReader in Master and MSDB, then promoting it to SysAdmin when the former didn't stop the error messages.
I tried the above first, after reading that trying Domain\MachineName$ was a red herring.
After none of that worked, I tried adding the Domain\MachineName$ with the same rights, then SysAdmin on the server.
None of the above has worked. I don't know what to try next.
I need to know what I to do here, and if it is adding a user to SQL Server, I need to know what rights it needs to be granted, in one or more DBs, and/or what server roles is must be granted. Also, is a service restart necessary for the solution to take affect?
This is on SQL Server 2014, on an Azure VM running Win 2012.

Thanks,
Chris

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidBrowne-msft avatar image
0 Votes"
DavidBrowne-msft answered

"Login failed for user 'domain\machinename$'.

If the login is originating from a service on the same server as the SQL Server you can see this error message when the actual login is from a virtual account. For instance if a local SSAS instance is connecting with the default service account, you need to grant access to

 NT Service\MSSQLServerOLAPService

even though the login failure displays the machine account. These virtual service accounts will use the machine account when connecting to remote servers, but not for local resources.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChrisStamey-9421 avatar image
0 Votes"
ChrisStamey-9421 answered

Through Profiler, I have learned that this is being caused by Microsoft SQL Server Iaas Agent Query Service.

Thanks,
Chris

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Criszhan-msft avatar image
0 Votes"
Criszhan-msft answered Criszhan-msft edited

Hi @ChrisStamey-9421,

Grant permissions to the account used for the Microsoft SQL Server IaaS Agent and IaaS Query Service.
sql-troubles.blogspot.com/2018/10/sql-server-troubleshooting-login-failed.html



If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI @ChrisStamey-9421,
Is there any update on this case?
If the answer is helpful, please click "Accept Answer" and upvote it.

0 Votes 0 ·
ChrisStamey-9421 avatar image
0 Votes"
ChrisStamey-9421 answered

Sorry, I got onto other issues and forgot about this one.

Through some more experimenting I found what no one spells out anywhere in the documentation:
Add NT SERVICE\SQLIaaSExtensionQuery to the SQL Server with SysAdmin rights.
Add NT Service\SQLIaaSExtension to the SQL Server with SysAdmin rights.

Chris

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.