2013-11-25 121 views
1

我执行位于服务器上的程序包的作业。该软件包已设置日志记录。当我禁用该日志记录时,它按预期执行得很好,但是当我通过日志记录运行它时会引发错误。Sql Server代理作业失败

信息:

  1. 工作和包位于同一台服务器上。
  2. 用户有权执行作业。
  3. 记录连接来自不同的服务器。

错误:

Executed as user: VHRDEVLHQ3379\SYSTEM. ....50.2500.0 for 64-bit 
Copyright (C) Microsoft Corporation 2010. 
All rights reserved.  
Started: 5:10:13 PM 

Error: 2013-11-25 17:10:14.61  
Code: 0xC0202009  
Source: Package Connection manager "HRPConfig"  
Description: SSIS Error Code DTS_E_OLEDBERROR. 
An OLE DB error has occurred. Error code: 0x80040E4D. 
An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D 
Description: "Login failed for user 'USER'.". 
End Error 

Error: 2013-11-25 17:10:14.69  
Code: 0xC0202009  
Source: Package Connection manager "Logging"  
Description: SSIS Error Code DTS_E_OLEDBERROR. 
An OLE DB error has occurred. 
Error code: 0x80040E4D. 
An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D 
Description: "Login failed for user 'USER'.". 
End Error 

Error: 2013-11-25 17:10:14.69  
Code: 0xC020801C  
Source: Package Log provider "SSIS log provider for SQL Server"  
Description: SSIS 
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. 
The AcquireConnection method call to the connection manager "Logging" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. COM error object information is available. 
Source: "Package" error code: 0xC0202009 
Description: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D Description: "Login failed for user 'USER'.". ". 
End Error 

Error: 2013-11-25 17:10:14.71  
Code: 0xC0202009  
Source: Package Connection manager "HRPConfig"  
Description: SSIS Error Code DTS_E_OLEDBERROR. 
An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D 
Description: "Login failed for user 'USER'.". 
End Error 

Error: 2013-11-25 17:10:14.79  
Code: 0xC0202009  
Source: Package Connection manager "Logging"  
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D 
Description: "Login failed for user 'USER'.". 
End Error 

Error: 2013-11-25 17:10:14.79  
Code: 0xC020801C  
Source: Package Log provider "SSIS log provider for SQL Server"  
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Logging" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. COM error object information is available. Source: "Package" error code: 0xC0202009 Description: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. 
Error code: 0x80040E4D. An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D 
Description: "Login failed for user 'USER'.". ". 
End Error 

Error: 2013-11-25 17:10:18.21  
Code: 0xC0202009  
Source: Package Connection manager "Logging"  
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. 
Source: "Microsoft SQL Server Native Client 10.0" 
Hresult: 0x80040E4D Description: "Login failed for user 'USER'.". 
End Error 

Error: 2013-11-25 17:10:18.27  
Code: 0xC0202009  
Source: Package Connection manager "Logging"  
Description: SSIS Error Code DTS_E_OLED... The package execution fa... The step failed. 
+0

你看过上面粘贴的错误消息吗?它非常突出,问题是什么 – billinkc

+0

感谢您的快速回复。但正如我在信息中所解释的,我确实可以访问所有的连接,但我无法弄清楚这个问题。 – ChelChabiloGujrati

+0

这是不是给你一个线索:'登录失败的用户'用户' –

回答

1

请问您的SQL Server代理帐户执行工作具有写权限的记录表?这听起来像是这个问题。

+0

是的。它具有写权限 – ChelChabiloGujrati

+0

我建议查看失败连接的SQL日志。这将有助于验证您是否连接到您认为要连接的服务器。错误消息肯定表示权限问题。如果身份验证失败,您也可以在数据库上运行SQL事件探查器,该事件连接到数据库会向您显示登录失败。 – swilliams

+0

谢谢大家的帮助。它解决了。我的作业脚本是正确的,但是该数据库没有对该SQLagent的许可,因为数据库相当新,而且以前从未访问过。 – ChelChabiloGujrati