I'm trying to login to a SQL Server instance from the server it runs on while remoted in as myself.
I keep getting the standard login failed error and in the error log I'm seeing "Error: 18456, Severity: 14, State: 11."
The login is using windows authentication - here's the weird bit. I can login fine from my own machine using the same authentication, just not when I'm on the machine the database is installed on.
Any ideas?
Thanks, Dave
Reason: Could not find a login matching the name provided. The login (whether using SQL or Windows Authentication) does not exist. For Windows Auth, it likely means that the login hasn't explicitly been given access to SQL Server – which may mean it is not a member of an appropriate domain group.
The generic message “Login Failed for User (Microsoft SQL Server, Error: 18456)” means you entered invalid credentials when logging into SQL Server.
2.3 Enabling SQL Authentication or Mixed Authentication Right-click the server you wish to modify and then click Properties. Select the Security Page. Under the Server authentication heading choose either the desired authentication: Windows Authentication or SQL Server and Windows Authentication mode. Click OK.
How does UAC work?
When an administrator logs on, this version of Windows creates two separate access tokens for the user: a standard user access token and an administrator access token. The standard user access token contains the same user-specific information as the administrator access token, but the administrative Windows privileges and SIDs have been removed. The standard user access token is used to start applications...
When you're logged in locally your administrator token is stripped. Since you granted access to your instance to BUILTIN\Administrators
, you are locked out of the instance. When authenticating remotely the administrator token is preserved and you gain access. You would gain access if you'd choose to RunAs\Administrator when starting your application (SSMS?).
The solution is to grant yourself access explicitly:
create login [domain\you] from windows;
exec sp_addsrvrolemember 'domain\you','sysadmin';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With