dbTalk Databases Forums  

SSIS: How to run tasks within a package outside of package transaction?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS: How to run tasks within a package outside of package transaction? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Axel Dahmen
 
Posts: n/a

Default SSIS: How to run tasks within a package outside of package transaction? - 05-31-2008 , 06:00 AM






Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM






Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #3  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #4  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #5  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #6  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #7  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #8  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #9  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS: How to run tasks within a package outside of package transac - 06-11-2008 , 02:52 PM



Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Quote:
Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
  #10  
Old   
Axel Dahmen
 
Posts: n/a

Default Re: SSIS: How to run tasks within a package outside of package transac - 06-12-2008 , 08:24 AM



Hi Todd,

thanks for trying to help!

But I guess that's not quite what I'm searching for... I don't want to run logging and worker tasks within the *same* transaction, I want to run the logging tasks *outside* of any transaction. Otherwise no-one outside of SSIS could actually see any progress while some long-taking tasks are running. See the difference here?

Would you know a solution for this scenario? Or does setting "RetainSameConnection" to true also prevent those logging tasks from blocking the others if Transaction is set to NotSupported for them?

Your help is quite appreciated.

Best regards,
Axel Dahmen



--------------
"Todd C" <ToddC (AT) discussions (DOT) microsoft.com> schrieb im Newsbeitrag news:431D40FE-8C35-4B63-89A0-66579498B737 (AT) microsoft (DOT) com...
Quote:
Hello Axel:

If all the operations are going against the same server, set its Connection
Manager Propert "ReatinSameConnection" to True

Now, on the Control Flow, create an Execute SQL Task connected to it with
the statement BEGIN TRANS

Down stream of that, do Data Flow 1, then another Execute SQL Task to Log
Step 1. Next is another Execute SQL Task with COMMIT TRANS.

By the way, you do not need any ROLLBACK TRANS steps because if anything
fails, the ROLLBACK happens automatically.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Axel Dahmen" wrote:

Hi,

in SSIS I've created a package that transforms data using several steps. I want to log each step in my [Jobs] table, so I've added Execute SQL tasks between each step to update the [progress] column in that table.

Here's the problem:

The transformation runs in a transaction, however, I don't want to have the progress update statements run within this transaction. Otherwise no-one could read any progress update until the whole package is committed.

I've tried to assign a second connection to the progress tasks and to set Transaction to NotSupported, IsolationLevel to ReadUncommitted. But then, the progress tasks just hang. What am I doing wrong?

Can anyone please enlighten me on how to achieve this?

Axel Dahmen


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.