0

I am making a system in which my database will be used on LAN. For that I made all the step and make a test.udl file for testing the client message to the server when I pressed on the test connection on the client PC, it shows the following error:

10/06/2019 15:26:46,Logon,Unknown,Login failed for user 'DESKTOP-4F7O4EQ\Guest'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.0.100] 10/06/2019 15:26:46,Logon,Unknown,Error: 18456 Severity: 14 State: 5.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Seems like the error is telling you the problem here. – Thom A Oct 06 '19 at 11:08
  • Is Sql Server on the same machine as the client (DESKTOP-4F7O4EQ)? Is there an AD Domain involved? – simon at rcl Oct 06 '19 at 11:11
  • If there is a domain, the device `DESKTOP-4F7O4EQ` isn't part of it, @simonatrcl . That or the OP is using a local account of the device, rather than a domain account; which would seem an odd choice considering that they are using a trusted connection. – Thom A Oct 06 '19 at 11:25
  • you could refer to this: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error?view=sql-server-2017 –  Oct 06 '19 at 11:44

2 Answers2

0

Seems your application trying to connect SQL Server via windows authentication which usually goes through the user that currently active in application or service account of the application, i'm not sure why the local guest trying to authenticate.

You may want verify the connection string, if no luck, test with SQL Authenticated user that got appropriate access on the SQL Server.

Further references on SQL Authentication:
Ref1
Ref2

Shekar Kola
  • 1,287
  • 9
  • 15
0

Do verify the connection string in the db properties file or so. It should be like the format:driver=com.microsoft.sqlserver.jdbc.SQLServerDriver url=jdbc:sqlserver://localhost:1433;databaseName=xxxx; user=xxxx pass=xxxx