SSIS Transaction

Aug 14, 2007

I am just started working on SSIS. I created one package and want to impliment the transactions.

The purpose of the package is to truncate the destination table and insert the records into destination table from flat file

i taken execute sql task to truncate the table and dataflow task to insert the records into destination table.

at the package level i given transaction option as required and isolation level is readcommitted.

when i run the package my execution stops at dataflow task and it is always yellow.

If i am using delete statement instead of truncate than it is working fine.

is truncate table creating any problem? I need to use truncate.

please suggest me how to impliment transaction using truncate and dataflow task.




View 4 Replies


ADVERTISEMENT

SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 22, 2007

I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.

for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.

I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.

if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

and

Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.

Please help me it's very urgent.

View 3 Replies View Related

TRANSACTIONS In SSIS (error: The ROLLBACK TRANSACTION Request Has No Corresponding BEGIN TRANSACTION.

Nov 14, 2006

I'm receiving the below error when trying to implement Execute SQL Task.

"The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION." This error also happens on COMMIT as well and there is a preceding Execute SQL Task with BEGIN TRANSACTION tranname WITH MARK 'tran'

I know I can change the transaction option property from "supported" to "required" however I want to mark the transaction. I was copying the way Import/Export Wizard does it however I'm unable to figure out why it works and why mine doesn't work.

Anyone know of the reason?

View 1 Replies View Related

How Do I Make Use Of Begin Transaction And Commit Transaction In SSIS.

Jun 1, 2007

Hi



How do I make use of begin transaction and commit transaction in SSIS.

As am not able to commit changes due to certain update commands I want to explicitly write begin and commit statements. but when i make use of begin and commit in OLEDB commnad stage it throws an error as follows:

Hresult:0x80004005

descriptionyntax error or access violation.



its definately not an syntax error as i executed it in sql server. also when i use it in execute sql task out side the dataflow container it doesnt throw any error but still this task doesnt serve my purpose of saving/ commiting update chanages in the database.



Thanks,

Prashant

View 3 Replies View Related

Problem With SSIS Transaction...Transaction Scope

Jun 1, 2006



Hi,

I am having some problem with SSIS transaction. Eventhought I tried to imitate the concept that Jamie presented at http://www.sqlservercentral.com/columnists/jthomson/transactionsinsqlserver2005integrationservices.asp

. My workflow is as followed

*********************************
For Each ADO.Record in Oracle (transaction=not supported)

If (Certain_Field_Value = 'A')


Lookup Data in SQL DB with values from Oracle (transaction=not supported)

DO Sequence A (Start a Transaction , transaction=required)


INSERT/UPDATE some records in SQLDB(transaction=supported)
Finish Sequence A ( transaction should stop here)
UPDATE Oracle DB ( Execute SQLTask, transaction=not supported)
If (Certain_Field_Value = 'B')


Lookup Data in SQL DB with values from Oracle (transaction=not supported)

DO Sequence B (Start a Transaction , transaction = required)


INSERT/UPDATE some records in SQLDB (transaction=supported)
Finish Sequence A ( transaction should stop here)
UPDATE Oracle DB ( Execute SQLTask, transaction=not supported)
If (Certain_Field_Value = 'C')

------------
------------
End ForEach Loop
*************************************
My requirements are that I want separate transaction for each Sequence A, B, C, etc... If Sequence A transaction fails, the other should still be continuing with another transaction.
But I am getting an error regarding the OLEDB Error in next Task (e.g in Certain_Field_Value = 'B') "Lookup Data in SQL DB with values from Oracle ", the error message is ".......Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. ".
What is it that I am doing wrong?
Regards
KyawAM

View 12 Replies View Related

SSIS With Transaction

Dec 5, 2006

Hi

I new in SSIS. I tried to do the simple package with transaction support.

I do the sql task wich "delete from TableName" and then i do a simple data flow from one table to "TableName" which i deleted from data before.

I wanted to use transaction that in case the data flow collapse the transaction will roll back the delete task of table.



But then i exucute my package it stucks like the table is locked.

Can any one help me with this package?

Thanks.

View 5 Replies View Related

SSIS Package As One Transaction

Jan 21, 2008

Hi,
I am a newbie in SSIS. I'd like to hear your recommendation to build the whole SSIS package as one transaction. In other words, how we can rollback all DML operations (insert/update/delete) that are applied in different parts of a package if for any reason the package failed to complete?. Something like rolling back a proc if the proc failed.

Thanks in advance

View 2 Replies View Related

SSIS Transaction ERROR

Nov 7, 2007

Hi all,
I'm having an issue with transactions in SSIS.


I have a Sequence Container, that contains 5 Tasks.



1) Data Flow Task using an OLEDB Connection to access an Oracle RDB database via a linked server. then insert into SQL Server 2005.

2) Execute Sql Task on Sql Server 2005 (UPDATE Statement)

3) Execute Sql Task on Sql Server 2005 (DELETE Statement)

4) Data Flow Task using an OLEDB Connection to insert data into a SQL Server 2005 DB

5) Execute Sql Task performing an UPDATE statement on an Oracle RDB database using an OLEDB Connection to to access the database via a linked server



If the Sequence container and all contained tasks are set to Transaction: Supported (No transaction will be created I believe), then the package runs successfully.



If I change the Sequence container to Transaction: Required, and leave all contained tasks as Transaction: Supported, then Task 1 fails with the following error:



[SELECT From RDB Change Table [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "SSISPOC" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.



Any Ideas would be much appreciated, as I'm stumped!




View 3 Replies View Related

How To Use Transaction In A SSIS Package

Aug 30, 2007

I try ton use a transaction in a SSIS package. When running i have an error :

[source [1]] Error: The AcquireConnection method call to the connection manager "myconnection" failed with error code 0xC0202009.

[Connection manager "myconnection"] Error: The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D025 "Le partenaire du gestionnaire de transactions a désactivé la prise en charge des transactions à distance/par réseau.".

Can someone help ?
thanks

View 8 Replies View Related

SSIS DTC Transaction's HOT Questions

Dec 8, 2006

I am using SSIS with Transaction, and I met a lot of questions as below:

1.IF DTC doesn't support ADO.NET Connection?

Please check the ADO.net Connection's property, it has a property named like: DTCTrancactionSupport. But it's always set to False and unable to edit.

IF the answer is NO, HOW could I bound all my Tasks into one Transaction? You know, I have some Tasks with SQL connection, and I have also some Script Tasks, witch need the ADO.net connection.

2.IF DTC required to run in both the Destination Server and the Source Server?

I have a Dataflow Task, and take some data from a table in a Source Server to a Destination Server. The DTC doesn't run on the Source Server. I found the Dataflow Task hangs when I use the SSIS Transaction(just set the Task's transactionOpion to Required, Only one Task in the Package).

3.IF DTC doesn't support RetainSameConnection?

Many people say that. Really?

4.When a DTC transaction is running, if the table in it could not be modified by process outside of the transaction? For example, a package with a DTC transaction, and there is a SQL Task inside, when it is running, could I modified the same table's data manually(in the Sql Sever Management Studio)?

View 10 Replies View Related

Transaction Causes Hanging Of SSIS

Aug 14, 2006

Hi

I set TransactionOption=Required for my SSIS package. In this package, 2 tasks are included,

one is execute sql (TransactionOption=supported)

2nd is DataTransformation Task (TransactionOption=Supported)

But it hangs on the execute sql task itself!

Didnt find any reason 4 it so far!

View 4 Replies View Related

Transaction With SSIS / SQL Server / DB2

Jun 13, 2006

Hi,

very simple task... I want to copy some data from a DB2 table to SQL Server. So I want to delete the records in the SQL Server table and copy all data from DB2 to the SQL Server. That's easy...

The only thing I want to make sure is that in case of an error I still have a valid dataset in the table. So my idea was to use a transaction covering the delete and the data flow.

So I moved the two tasks in a container, switched transactions to "required"...

What I see is that now a distributed transaction is started for DB2 and the SQL Server. But that's not what I want (and it doesn't work also...). I don't need the transaction on the DB2 side, I just want it on the SQL Server to cover the delete and the insert.

What can I do?



Thanks,

View 8 Replies View Related

Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

May 31, 2008

Hi All

I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.

If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.

I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.

set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN


It's got me stumped, so any ideas gratefully received.Thx

View 1 Replies View Related

SSIS Package Transaction Limit?

Oct 27, 2006

I am running a package in which all tasks participate in a transaction.  One task is a ForEach Loop container that executes 1 SQL INSERT statement per loop.  The Loop runs well over 100 times in order to normalize a very, very, very wide table.

It seems that at a certain point, the Loop task will fail.  I've tested a few different scenarios and they all fail at the same point... the 98th loop.

The error message is below:

[Execute SQL Task] Error: Failed to acquire connection "ADO.NET Connection". Connection may not be configured correctly or you may not have the right permissions on this connection.  

I'm guessing that there is a limit to the number of connections that can be started at any one time.  But I figured SSIS wouldn't start a new connection for every SQL command.

Any insight on this issue?  Anyone have an idea for a work around?

View 2 Replies View Related

Roll Backing The Transaction In SSIS

Jun 13, 2007

Hi



I have a situation where i need to insert or update the data from a flat file to a sql server database. The flat file contains nearly one lakh records.



I am using transactions. If all the rows are inserted or updated successfully i am commiting. If there is any error i am rollbacking the transaction.



when rollbacking the transaction it is taking more than 3 to 4 hours.



Can any one suggest me how to do that in batches?



Thanks in Advance

View 12 Replies View Related

Truncation Of Transaction Logs Using SSIS

Feb 8, 2008


HI,

What I have set out to do is to try and truncate the transaction logs on my server instances after a nightly backup. I went ahead and used the shrink database option in the maintenance plan wizard. Unfortunately I have found this will only truncate the logs for databases using the simple database recovery model, and I wish to truncate the whole lot to save space...

I went ahead and put together an SSIS package that does the following:

1. First thing I do is build a fresh copy of a database listing in a temp table using the following SQL statement

USE Master;
Go
SELECT name, DATABASEPROPERTYEX(name, 'Recovery') AS RecoveryModel, DATABASEPROPERTYEX(name, 'Status') AS DBStatus INTO TempTables.dbo.Recovery FROM sysdatabases ORDER BY name
GO

2. Next I read this dataset back into memory using a SQL statement as follows:

USE TempTables
GO
Select name from dbo.recovery Where name <> 'master' and name <> 'model' and name <> 'msdb' and name <> 'tempdb'

I map the results to a results set called User::TableName (which is of an object data type)

3. Next the package goes to a ForEach Loop container and I use the Foreach ADO Enumerator Enumerator to read the data I just selected into the look. I select the User::TableName variable and use the enumeration mode 'Rows in first table'. I have used a variable mapping of Variable: User::TableName with an Index 0.

4. I then use the following SQL statement (which sits in the For Each Loop) to try and alter the recovery model:

ALTER DATABASE @TableName
SET RECOVERY SIMPLE;
GO
This is where the package falls over with the following error message

SSIS package "mnt_TransLog.dtsx" starting.
Error: 0x0 at Simple Mode: Incorrect syntax near '@TableName'.
Error: 0xC002F210 at Simple Mode, Execute SQL Task: Executing the query "ALTER DATABASE @TableName
SET RECOVERY SIMPLE;
" failed with the following error: "'RECOVERY' is not a recognized SET option.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Simple Mode
Warning: 0x80019002 at For Each Table Set to Simple: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at mnt_TransLog: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "mnt_TransLog.dtsx" finished: Failure.

I think the problem here is either I am not passing the variable across correctly (i.e. not declaring it or something..!) or I am passing the wrong type of variable across.

Once the recovery model is changed I can truncate the transaction logs successfully but I can€™t seem to until this is done! Any help in finding a solution to this problem or a better way of approaching this problem would be appreciated!

Thanks

Marek Kluczynski
Management Information Officer
Investors in People UK
7-10 Chandos Street
London
W1G 9DQ
Tel: 020 7467 1956

View 3 Replies View Related

SSIS Package Transaction Integrity

Nov 7, 2006

1) I created many data flow task packages.

2) Then a execute package task in which I ordered relationally execute above data flow packages.

3) What I find is when a package fails, it is rolled back, execution stops but not the packages before this failed one.

4) What to do to rollback all in case of error and commit only if all are successfully executed?

View 4 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 6, 2007

I am getting this error  :Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.OleDb.OleDbException: Distributed transaction completed. Either
enlist this session in a new transaction or the NULL transaction.have anybody idea?!

View 1 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Dec 22, 2006

i have a sequence container in my my sequence container i have a script task for drop the existing tables. This seq. container connected to another seq. container. all these are in for each loop container when i run the package it's work fine for 1st looop but it gives me error for second execution.

Message is like this:

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

View 8 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction. (HELP)

Jan 8, 2008

Hi,

i am getting this error "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".

my transations have been done using LINKED SERVER. when i manually call the store procedure from Server 1 it works but when i call it through Service broker it dosen't work and gives me this error.



Thanks in advance.


View 2 Replies View Related

SSIS With Transaction Accross Different Network Zone

Nov 1, 2007

Hello, all

I have developed a SSIS package using a transaction

1. Users upload excel file to web server(139.223.15.xxx)
2.Excute SSIS package in web server to import excel file to SQL SERVER 2005(139.223.3.xxx)

If web server and SQL server are in the same network zone, the package will work successfully.

However, the two servers are in the different network zone, it encounters an error :

DTS can't enlist OLE DB in distribution transaction. Error Code: 0x8004D00E

How do I set any configurations?

Environment:
Web server:windows 2003 server sp1 ent
SQL server 2005 ent:windows 2003 server sp1 ent
SSIS: isolation level-->read committed

View 1 Replies View Related

SSIS Package In Transaction Required Mode?

Jul 24, 2007

Hi Guys,



Refering to my previous post I've a package which easily run when transaction mode is Supported but when i put it to Required and All DFs are supported inside the sequence container it won't run.

Well technically it goes and pass step 1, so it goes to green but regardless of what i put in the 2nd DF it won't run. It just hangs in there.
When i check the component service and check DTC, the transaction would be running but never commited.

I have done most of the things about DTC and configuration with the MS articles as this package was failing before but now it just sits at this point.

Any ideas?



Thank you



Gemma

View 3 Replies View Related

Implementing Transaction In SSIS Package Using SQL Task

Dec 16, 2007



Hi all,

I am having a simple ssis package. In that i have an sql task that will insert a record in to the database. i find that if i use a simple OLEDB connection it works fine. but the problem comes here when i change the connection string with an valiable. Once i assign the same connection string to a valiable and assign the variable as expression, there after i encounter the following error.



[Execute SQL Task] Error: Failed to acquire connection "DB connection". Connection may not be configured correctly or you may not have the right permissions on this connection.

I am struggling with this for a long time.

Any of you plz suggest me a solution for this problem

Thankz

View 2 Replies View Related

Can A SSIS Package Join An External Transaction?

Mar 30, 2006



Hi there,

I'm trying to come up with the best way to build some C# Unit tests for an SSIS package I've built.

My C# code does the following

1. Creates a Transaction Scope using System.Transactions

2. Puts some source data for my package into a table that the package will read

3. Kicks off the Package using System.Diagnostics.ProcessStartInfo

Im getting a Transaction TimeOut execption which I beleive is caused because the Package can't read the source data I've inserted becuase the package has not joined the transaction.

So the question is - can you call a run a package and make it participate in a transaction that you have created outside of the package?

Thanks.





View 1 Replies View Related

Transaction Not Working When Inserting Data Into Oracle Db Using SSIS.

Jan 11, 2007

Hi Guys,

I have a package that inserts data from a sql server table to an oracle table. I use a dataflow task to do the loading.

The weird thing is, if the package fails during execution, the transaction does not perform a rollback and the inserted data is committed.

The dataflow component has its TransactionOption set to Supported (this has always been the case for our sql to sql packages). However, now that I have a sql to oracle package, it won't work anymore.. also, setting the TransactionOption of the dataflow component to Required causes the whole package to fail.

Anyone have any thoughts on this?

Thanks,
Kervy

View 1 Replies View Related

Using Transaction On SSIS Package Failed On Cross Domain.

Jul 25, 2007

I want to use Transaction(MS DTC) in SSIS package across domain. It's working fine if both the servers are in Corpnet microsoft domain but failing it one of the server at extranet microsoft domain. I did all the required settings for MS DTC service to run for distrubuted transaction and in SSIS package did the "TransactionOption" property for the container object to "Required" and for all inner tasks to "Supported". Is it possible or a Security voilation which won't allow to do through SSIS package.



Example: I have a database on Extranet server and a database at Corpnet Server.

Sql Job will pull the data from Extranet Database to Corpnet database through SSIS package and update back to Extranet database. Job will reside on Corpnet server.



SSIS package is failing with the error message: The AcquireConnection method call to the connection manager "<Connection Manager name>" failed with error code 0xC0202009.



Any special setting do we require for this. I did the following setting on both the servers:

Ø MS DTC should run on both the servers under €œNetwork Service€?
Ø Set the following on both the servers(ExtranetCoptnet) to run on a Distributed Transaction:
§ Go to "Administrative Tools > Component Services"
§ On the left navigation tree, go to "Component Services > Computers
§ €œMy Computer" (you may need to double click and wait as some nodes
need time to expand)
§ Right click on "My Computer", select "Properties"
§ Select "MSDTC" tab
§ Click "Security Configuration"
§ Make sure you check "Network DTC Access", "Allow Remote Client",
"Allow Inbound/Outbound", "Enable TIP"
§ The service will restart



Note: If I will chage the Extranet server to Corpnet then it's working file for me.

View 1 Replies View Related

Using RetainSameConnection During Distributed Transaction In SSIS ForEach Container

Aug 15, 2006

Hi -

I've seen variations on this question in this forum, but none of the suggestions work for me, so any ideas would be greatly appreciated!

I have a SSIS package whose function is to monitor a directory for flat files and distribute the information in these files into a SQL 2005 DB for further processing later. I've configured Transactions for the package as serializable and supported, and I have a ForEach container set to serializable and required. All SQL and Data Flow tasks take place within this container. I have a single Connection Manager to pull in the flat input file, and another for the connection to the SQL DB. This setup will function, and roll back if necessary, but I take a huge hit on the continual establishment of connections to the DB. If I set the retainsameconnection property on the SQL DB Connection manager, I get an error when executing my first Data Flow task to move data from the flat input file to working tables within the DB: 0xC001A004 - Incompatible transaction context was specified for a retained connection. If I turn off Transaction support, the retainsameconnection property works as expected.

I've been running Profiler Traces, and can verify that no connection has been established to the SQL Server prior to execution of this task, so it seems like the context should be OK. I would welcome any feedback, suggestions or alternatives.

Thanks,

Jim SweeneySLC

View 2 Replies View Related

SSIS Execution Error While Choosing Transaction As Required

Mar 25, 2008

Hi,

I have created a few packages and i want to execute this in a sequence so I created a wrapper/parent package and added all the other packages as child Package using the Execute Package Task. These packages are file system based packages. I am executing the wrapper/parent package from a web page which will execute all the child packages. All is well and works fine when I choose the TransactionOption as "Supported" in my wrapper/parent package but when I choose the TransactionOption as "Required" in my wrapper/parent package I get the following error

Error Occurred: The package is failed due to following: The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D024 "The transaction manager has disabled its support for remote/network transactions.".


What I am doing is connecting to 3 DB in the same server and doing some data manipulation. The MSDTC is running in the Target SQL Server and also the DTC Server in my Local is started and running. What else could be the problem.

Thanks in advance for any and all help

View 1 Replies View Related

How To Create A Transaction Commit/Rollback For Oracle DB In SSIS

Oct 8, 2007

I'm able to connect to the Oracle database to insert the data into multiple tables using OLEDB connection via Oracle Provider for OLEDB. However, i wish to create a transaction so that i'm able to rollback all the data in the case where the insertion fails in one of the table. May i know where should i start from?

View 4 Replies View Related

Integration Services :: Begin And Rollback Transaction In SSIS

Sep 17, 2015

I am trying to use sql transaction in foreach loop where I am passing  1 ID @ a time .I want to rollback only current ID.1st task in foreach is execute sql task with begin tran and next is data flow task with 2 source and destination for 2 different tables (if anyone fails then rollback from all tables). After data flow is another execute sql task with rollback tran on failure (logical condition on pipe is OR). The rollback works but only rollback 1 table although I want to rollback on current iteration ID of foreach  from both tables.

View 3 Replies View Related

SSIS Transaction Management &&amp; Strange Deadlock When Using XLOCK, ROWLOCK

Jun 7, 2007

I have a SSIS package that is run from one job, nowhere else. The package has TransactionOption NotSupported.



In the SSIS package I first have a sequence container that has TransactionOption Required (Serializable). The sequence container contains several Execute SQL tasks that access the same SQL Server 2005 database. The Execute SQL tasks have TransactionOption supported / Serializable. The first SQL statement is:



select p.column_name

from table_name p with (XLOCK, ROWLOCK)

where p.second_column_name = 'COLUMN_VALUE'



After this there are a couple of SQL tasks, and finally a task containing the following SQL:



select p.third_column_name

from table_name p

where p.second_colomn_name = 'COLUNM_NAME'



The idea is that the first query exclusively locks the row in the table_name-table for mutual exclusion purposes, i.e. so that if for some reason the SSIS package would be executed simultaneously two or more times, only one package execution could lock the row and proceed and the other executions will have to wait. There's an index on column second_column_name in the table to avoid the select locking other rows in addition to the required row.



Some questions:

1) Is it so in my setup that when SSIS runtime executes the sequence container it creates a transaction in the beginning of the sequence container and commits the transaction in the end of the sequence container? And in my setup the Execute SQL tasks in the sequence containar are executed under the same transaction?

2) I have a problem that the second query sometimes gives this error:"ErrorCode: -1073548784. ErrorDescription: Executing the query "XXXXX" failed with the following error: "Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

The 1st query has locked the row for the transaction. How can the second query be deadlocked, shouldn't the transaction have a lock on the row? I'd understand if the 1st query failed sometimes, but don't understand how the 2nd quey can fail.



r,

JM

View 3 Replies View Related

Implementing Transaction In SSIS Package - [Execute SQL Task] Error: Failed To Acquire Connection &&<ConnectionName&&>.

Jun 30, 2006

I have a simple SSIS package with three "Execute SQL Tasks". I am using ADO.Net Connection to execute SPs on a DB server.

When I execute this package It works fine. So far so good.

Now, I need to implement transation on this package. And problem starts now onwards. When I try to execute package after setting TransationOption = Required for the Sequence container which contains all the tasks, I get following error.

[Execute SQL Task] Error: Failed to acquire connection "NYCDB0008.Export". Connection may not be configured correctly or you may not have the right permissions on this connection.

"NYCDB0008.Export" is the name of the ADO.Net connection. I have been hunting for any solution but all in vain. I have tried changing all DTC settings on the dev as well as Database server.

Please respond if anyone has any solution.

Thanks!

Anand

View 24 Replies View Related

Help! The Transaction Log Is Full Error In SSIS Execute SQL Task When I Execute A DELETE SQL Query

Dec 6, 2006

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved