我想使用存儲過程執行SSIS包,我正在使用SQL Server 2014,我在SP上出錯。使用存儲過程執行SSIS pacakge
代碼:
Alter procedure ExamplePackage
@output_execution_id bigint output
as
begin
declare @execution_id bigint
DECLARE @BranchErrorMessage nvarchar(100)
DECLARE @ContractDateErrorMessage nvarchar(100)
DECLARE @ContractNoErrorMessaget nvarchar(100)
DECLARE @CreatedBy bigint
DECLARE @DatabaseConnection nvarchar(100)
DECLARE @DSA_IDErrorMessage nvarchar(100)
DECLARE @DSACodeErrorMessage nvarchar(100)
DECLARE @FileDiscriminator nvarchar(100)
DECLARE @FileName nvarchar(100)
DECLARE @FinAmountErrorMessage nvarchar(100)
DECLARE @IsDeleted bit
DECLARE @ProductCodeErrorMessage nvarchar(100)
DECLARE @ProductErrorMessage nvarchar(100)
DECLARE @SourceFilePath nvarchar(100)
DECLARE @SubProductCodeErrorMessage nvarchar(100)
DECLARE @TFlexTypeId bigint
DECLARE @WorkRequestId bigint
exec ssisdb.catalog.create_execution
@BranchErrorMessage = 'Branch code does not exist in Branch Master'
,@ContractDateErrorMessage = 'ContractDate is Empty',
@ContractNoErrorMessaget='ContractNo is Empty',
@CreatedBy='2' ,
@DatabaseConnection='Data Source=SAMDK12120010;User ID=sa;Password=jgd123$;Initial Catalog=TataCapitalTest6_May;Provider=SQLNCLI11.1;Auto Translate=False;',
@DSA_IDErrorMessage='DSA Id is invalid',
@DSACodeErrorMessage='DSACode is Empty',
@FileDiscriminator='IntermediateError',
@FileName='ss',
@FinAmountErrorMessage='FinAmount is Empty',
@IsDeleted='False',
@ProductCodeErrorMessage='ProductCode is Empty',
@ProductErrorMessage='Product code/SubProduct code does not exist in Product Master',
@SourceFilePath='D:\Vinoth Kannan\Package new\ODS_CLMS_DAILY_DISBURSED_CASES_PLBL_17012016-15.01.txt',
@SubProductCodeErrorMessage='SubProductCode is Empty',
@TFlexTypeId='20',
@WorkRequestId='200',
@package_name = 'DisbursePLBLCaseIntermediateImportPackage.dtsx'
,@execution_id = @execution_id output
exec ssisdb.catalog.start_execution
set @output_execution_id = @execution_id
print @output_execution_id
end
我得到錯誤:
sg 201, Level 16, State 4, Procedure ExamplePackage, Line 0
Procedure or function 'ExamplePackage' expects parameter '@output_execution_id', which was not supplied.
SP調用示例:與參數
Exec ExamplePackage
後您怎麼稱呼你ExamplePackage SP。 –
Exec ExamplePackage –
獲取錯誤,如Msg 911,Level 16,State 4,過程execute_ssis_package_sample,Line 6 數據庫'ssisdb'不存在。確保名稱輸入正確。 –