Sqlserver
 sql >> Teknologi Basis Data >  >> RDS >> Sqlserver

Bagaimana cara memeriksa hasil pekerjaan paket SSIS setelah menyelesaikan eksekusinya?

gunakan prosedur di bawah ini untuk mendapatkan kesalahan SSIS dengan id eksekusi

CREATE PROCEDURE [dbo].[get_ssis_status] @EXECUTION_ID INT\n
AS
BEGIN
  SELECT o.operation_id EXECUTION_ID
    ,convert(datetimeoffset,OM.message_time,109) TIME
    ,D.message_source_desc ERROR_SOURCE
    ,OM.message ERROR_MESSAGE
    ,CASE ex.STATUS
        WHEN 4 THEN 'Package Failed'
        WHEN 7 THEN CASE EM.message_type 
            WHEN 120 THEN 'package failed' 
            WHEN 130 THEN 'package failed' ELSE 'Package Succeed'END
        END AS STATUS
FROM SSISDB.CATALOG.operation_messages AS OM
INNER JOIN SSISDB.CATALOG.operations AS O ON O.operation_id = OM.operation_id
INNER JOIN SSISDB.CATALOG.executions AS EX ON o.operation_id = ex.execution_id
INNER JOIN (VALUES (- 1,'Unknown'),(120,'Error'),(110,'Warning'),(130,'TaskFailed')) EM(message_type, message_desc) ON EM.message_type = OM.message_type
INNER JOIN (VALUES 
 (10,'Entry APIs, such as T-SQL and CLR Stored procedures')
,(20,'External process used to run package (ISServerExec.exe)')
,(30,'Package-level objects')
,(40,'Control Flow tasks')
,(50,'Control Flow containers')
,(60,'Data Flow task')
    ) D(message_source_type, message_source_desc) ON D.message_source_type = OM.message_source_type
WHERE ex.execution_id = @EXECUTION_ID
AND OM.message_type IN (120,130,-1);
END


  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Buat Objek DIE di SQL Server

  2. Cara membuat kueri pivot di server sql tanpa fungsi agregat

  3. Cara Menemukan Item Daftar pada Posisi Tertentu di SQL Server

  4. Pratinjau publik pertama SQL Server 2019 :CTP 2.0

  5. Memahami Grup Ketersediaan Selalu AKTIF antara Instans SQL Server Berbasis Linux. Bagian 1