Sql-Server

SQL Server 代理 SSIS 錯誤

  • August 19, 2013

當我將包作為 SQL Server 代理作業執行時,出現以下錯誤。

它是在 SQL Server 2008 實例上執行的 SSIS 2008 包。我的包裹安全性是 DontSaveSensitive。

我什至不知道如何開始修復這個錯誤。

我應該先檢查哪裡?

Date        a value of time
Log     Job History (MyJob)

Step ID     1
Server      PCTSQL004
Job Name        MyJob
Step Name       Job_1
Duration        00:00:00
Sql Severity        0
Sql Message ID      0
Operator Emailed        
Operator Net sent       
Operator Paged      
Retries Attempted       0

Message
Executed as user: CS\DmcSysManager. The process could not be created for step 1 of job 0x63BB5A86DB23F947866D2A806BE4CC6B (reason: A required privilege is not held by the client).  The step failed.

它是在 SQL Server 2008 實例上執行的 SSIS 2008 包。我的包裹安全性是 DontSaveSensitive。

您必須EncryptAllWithPassword使用密碼保存包。

在此處輸入圖像描述

然後使用 SQL 代理作業安排它,如下所示:

"DriveLetter\Program Files\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /FILE "SSIS_Package_Location\bin\Package.dtsx" /DECRYPT "PasswordStrong007" /CONFIGFILE "Location_to_Config_file_If_any\Config.dtsConfig" /CHECKPOINTING OFF /REPORTING E

現在,您使用的使用者帳戶應該對數據庫伺服器實例具有權限。

您可以使用以下 T-SQL 檢查權限:

SELECT [Login Type] = CASE sp.type
       WHEN 'u'
           THEN 'WINDOWS Login'
       WHEN 's'
           THEN 'SQL Login'
       WHEN 'g'
           THEN 'GRP'
       END
   ,convert(CHAR(45), sp.NAME) AS srvLogin
   ,convert(CHAR(45), sp2.NAME) AS srvRole
   ,convert(CHAR(25), dbp.NAME) AS dbUser
   ,convert(CHAR(25), dbp2.NAME) AS dbRole
FROM sys.server_principals AS sp
JOIN sys.database_principals AS dbp ON sp.sid = dbp.sid
JOIN sys.database_role_members AS dbrm ON dbp.principal_Id = dbrm.member_principal_Id
JOIN sys.database_principals AS dbp2 ON dbrm.role_principal_id = dbp2.principal_id
LEFT JOIN sys.server_role_members AS srm ON sp.principal_id = srm.member_principal_id
LEFT JOIN sys.server_principals AS sp2 ON srm.role_principal_id = sp2.principal_id

引用自:https://dba.stackexchange.com/questions/44900