Kazmi
Kazmi

Reputation: 33

SSIS Log Errors to Excel

I am new to SSIS. I have come across a requirement to where I need to log the errors to Excel file.

In SSIS Logging, I can find Log providing for Windows, text files, xml files, SQL Server, SQL Server Profiler options but I can't find the option for Excel.

Can anyone please tell me how can I achieve this?

Upvotes: 1

Views: 396

Answers (3)

Kyle Hale
Kyle Hale

Reputation: 8120

If you're deadset on doing this, you can set up a particular Excel workbook (in a static network location) as a linked server within SQL Server and then use SQL Server logging to write to it.

Needless to say, not recommended.

Upvotes: 1

Tab Alleman
Tab Alleman

Reputation: 31785

You can log the errors to SQL Server, and then run a final dataflow to export the log to Excel.

Or you could set up your end user with a datasource in Excel that lets him use Excel to view the error log table in SQL Server.

However, treating your question as academic, I know of no way to configure SSIS so that it can log errors directly to Excel with built-in logging. If you really wanted to do this, you could write a custom script in the error handler.

Upvotes: 1

ldobre
ldobre

Reputation: 401

Hmm, I think that you can use Event Handlers to write into Excel files the log messages (On Info, On Error). However, that excel file won't be available while the package is running. From my experience, using excel files in SSIS is trickier than using plain old csv files. So I would use an csv as the target for log. That way you get a stable package, you can monitor the file with a text editor (notepad++) and the user can open it in Excel after the package has finished.

Upvotes: 1

Related Questions