SSIS Errorcode description

Hi All,

I am doing SSIS custom logging.

I have created the the SP_logerror to log the errors to Dataloadevents table. However my expression is partially working. I am not able to log more than 100 characters of error.

I have given the error table structure and  SSIS expression.

"EXEC Sp_LogError   "+"'"+ @[System::PackageName] +"','"+ @[System::SourceName] +"','"+ @[System::UserName] +"','"+ (DT_STR,10, 1252) @[$Package::DataSetID] +"','"+ (DT_STR,10, 1252) @[$Package::ReconciliationID]+"','Buysale'"+",'"+ (DT_STR,100, 1252) @[$Package::ProcessingYear] +"','"+ SUBSTRING(@[System::ErrorDescription],101,200)+"'"+",'Error'"

CREATE TABLE [dbo].[DataLoadEvents](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[LoadName] [varchar](50) NULL,
	[Task] [varchar](50) NULL,
	[Date] [date] NULL DEFAULT (getdate()),
	[UserName] [varchar](100) NULL,
	[Package] [varchar](50) NULL,
	[ProcessingYear] [varchar](5) NULL,
	[DataSetID] [varchar](5) NULL,
	[ReconciliationID] [varchar](5) NULL,
	[Error] [varchar](max) NULL,
	[Type] [varchar](5) NULL,
	[FileName] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

The problem here is i am not able to log more than 100 characters of error description. If i am logging more than 100. I am getting error. Please help on the same.

August 31st, 2015 3:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics