简体   繁体   English

SQL 服务器连接客户端到服务器时远程连接出错

[英]Error in remote connection in SQL Server when connecting the client to the server

I am making a system in which my database will be used on LAN.我正在制作一个系统,我的数据库将在 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:为此,当我按下客户端 PC 上的测试连接时,我完成了所有步骤并制作了一个 test.udl 文件来测试到服务器的客户端消息,它显示以下错误:

10/06/2019 15:26:46,Logon,Unknown,Login failed for user 'DESKTOP-4F7O4EQ\Guest'. 2019 年 10 月 6 日 15:26:46,登录,未知,用户 '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. [客户端:192.168.0.100] 10/06/2019 15:26:46,登录,未知,错误:18456 严重性:14 State:5。

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.似乎您的应用程序试图通过 windows 身份验证连接 SQL 服务器,该身份验证通常通过当前在应用程序的应用程序或服务帐户中活动的用户,我不确定为什么本地访客尝试进行身份验证。

You may want verify the connection string , if no luck, test with SQL Authenticated user that got appropriate access on the SQL Server.您可能需要验证连接字符串,如果没有成功,请使用 SQL 验证用户在 SQL 服务器上获得适当访问权限。

Further references on SQL Authentication: SQL 身份验证的更多参考资料:
Ref1参考1
Ref2参考2

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应该是这样的格式: driver=com.microsoft.sqlserver.jdbc.SQLServerDriver url=jdbc:sqlserver://localhost:1433;databaseName=xxxx; user=xxxx pass=xxxx driver=com.microsoft.sqlserver.jdbc.SQLServerDriver url=jdbc:sqlserver://localhost:1433;databaseName=xxxx; user=xxxx pass=xxxx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM