SQL Server 2012 Can't log in with machine account
It is most likely not the DOMAIN\computer$ at all. This message is known to be a misleading. I think all it wants is that "NT AUTHORITY\NETWORK SERVICE" be granted the server access. Open SQL Server login properties and add this account. Also, check what user is used in the IIS to impersonate anonymous user, it should be something like "IUSR_ServerName". Grant access to this user as well
Both @cha and @alt have right clues - the error message is misleading and Application Pool Identity
is involved (well, at least it was in my case).
If your IIS app's application pool uses Application Pool Identity
, the user account you need to add to SQL Server is IIS APPPOOL\your_app_pool_name
. Note: don't use the Search...
button in Login Properties to find this user - it will find it, but will substitute it with MACHINE_NAME\your_app_pool_name
which won't work - just type IIS APPPOOL\your_app_pool_name
as the login name.
This problem should be handled differently depending on the server setup.
SQL and IIS server are on the same machine.
a. change the Application Pool Identity to
Network Service
b. add NT
AUTHORITY\NETWORK SERVICE
to your SQL server loginSQL and IIS server are on different machine.
a. add machine account,
DOMAIN\computer-name$
, to your SQL server login.b. the Application Pool Identity remains
Application Pool Identity