SqlException &定时器作业

发布于 2024-08-23 22:14:37 字数 483 浏览 8 评论 0原文

我发现下面的 ULS 日志条目是计时器作业 (OWSTimer.EXE) 导致的,但是我想知道计时器作业的名称,我该如何实现这一点? (不启用详细日志记录)

System.Data.SqlClient.SqlException:A 与网络相关或特定于实例的 建立时发生错误 连接到 SQL Server。服务器 未找到或无法访问。 验证实例名称是否为 正确并且 SQL Server 是 配置为允许远程 连接。

SqlError: '与网络相关或 发生特定于实例的错误 建立与 SQL 的连接 服务器。找不到服务器或 无法访问。验证 实例名称正确且 SQL 服务器配置为允许远程 连接。 (提供者:TCP 提供者, 错误:0 - 等待操作计时 出。)'来源:'.Net SqlClient 数据 提供商编号:258 州:0 类别: 20 过程:'' 行号:0 服务器: ''

I found the below ULS Log entries, Timer job (OWSTimer.EXE) is causing this however would like to know the name of the Timer-job, how can i achieve this? (without enabling verbose logging)

System.Data.SqlClient.SqlException: A
network-related or instance-specific
error occurred while establishing a
connection to SQL Server. The server
was not found or was not accessible.
Verify that the instance name is
correct and that SQL Server is
configured to allow remote
connections.

SqlError: 'A network-related or
instance-specific error occurred while
establishing a connection to SQL
Server. The server was not found or
was not accessible. Verify that the
instance name is correct and that SQL
Server is configured to allow remote
connections. (provider: TCP Provider,
error: 0 - The wait operation timed
out.)' Source: '.Net SqlClient Data
Provider' Number: 258 State: 0 Class:
20 Procedure: '' LineNumber: 0 Server:
''

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

顾北清歌寒 2024-08-30 22:14:37

您可以尝试使用像wireshark这样的工具来查看正在生成什么类型​​的网络流量以及在哪个帐户下发出请求以及正在向哪个SQL框发出请求。我怀疑此错误是通过以下方式之一触发的(前 2 个不太可能的方式,然后是可能的问题):

  • 不太可能:安全问题,sql 无法访问进行调用的帐户,也许源自使用自己的(非共享点)数据库的计时器作业。
  • 不太可能:计时器作业使用的(非共享点)数据库不再存在,或者它运行的 sql 框无法访问。
  • 很可能,Web 应用程序正在使用本地服务或网络服务帐户(或任何其他本地用户)运行。绑定到该 Web 应用程序的计时器作业等中的代码可能会使用该帐户。如果它是本地帐户,并且您没有授予对 sql 计算机上该帐户的访问权限,则它无法访问另一台计算机上的数据库。并且授予计算机 A 上的本地帐户对计算机的访问权限并不是您通常会做的事情(我希望如此)。

You could try using a tool like wireshark to see what kind of network traffic is being generated and under which account a request and to which SQL box is being made. I suspect this error is triggered one of the following ways (first 2 unlikely ones, then the likely problem):

  • Not likely: a security issue, sql is inaccessible to the account the call is made under, maybe originating from a timerjob that uses a (non sharepoint) database of it's own.
  • Not likely: a (non sharepoint) database used by a timerjob doesn't exist anymore, or the sql box it was running on is unreachable.
  • Very likely, a webapp is running using either the local service or the network service account (or any other local user). Code in timerjobs etc. bound to that webapp might use that account. If it is a local account, it won't have access to a database on another machine if you haven't granted access to that account on the sql machine. And granting a local account from machine A access to machine is not something you would normally do (I hope).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文