question

SKG-6000 avatar image
0 Votes"
SKG-6000 asked ZoeHui-MSFT answered

SSIS & RAISEERROR

Hi All,

I have an SSIS sql exec task with a long running stored procedure, in which i want to persist the progress even if transaction is rolled back.

Is it possible to get notifications of Raiserror in SSIS eventhanders so i can write to another table in SQL.


Thank you!



CREATE PROCEDURE dbo.LongRunningStoredProc
as

BEGIN TRANSACTION

RAISERROR('Loading transaction table #1',10,1)

--Load #1

RAISERROR('Loading transaction table #2',10,1)
--Load #2


RAISERROR('Loading transaction table #3',10,1)

COMMIT TRANSACTION

sql-server-integration-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered

Hi @SKG-6000,

Temporarily, I did not find a good way to meet your requirement from SSIS side.

You may keep this case open to see if other experts could provide a resolution.

In addition, I think it could be more easier to solve from TSQL side, you may have a try.

If you are not familiar with TSQL, you may create a new case with tag 'sql-server-transact-sql' for advice.

Regards,

Zoe


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.