2013-11-25 155 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