Problem With Transactions In SSIS Package Containing Cursor
Apr 4, 2008
Hi All,
We have a SSIS package where we have implemented a cursor in Execute SQL Task.
Immediately after this Execute SQL Task, we have a Data Flow Task.
The package was running absolutely fine until we changed the Transaction property of the Package to "Required".
The Transaction property for all the tasks in the Control Flow is set to "Supported".
Now, after the execution of the Execute SQL Task containing the cursor, the Data Flow Task becomes "yellow", but, does not execute. The package then gets stuck at this point and does not execute any further.
Anybody has encountered such a problem with Transactions in SSIS?
Thanks in advance.
Regards,
B@ns.
View 1 Replies
ADVERTISEMENT
Aug 30, 2006
Hey, I've a few jobs which call SSIS packages. If I run the SSIS package, it runs fine but if I try to run the job which calls this package, it fails. Can someone help me troubleshoot this issue? None of my jobs that call an SSIS package work. All of them fail.
Thank you
Tej
View 7 Replies
View Related
Oct 10, 2007
Greetings,
I have a requirement from the client that specifies to rollback every insert/update that happenned in the package if any task (control or data flow) fails.
I'm certain the SSIS package-level transactions take care of this, however, in this package, there is an OLE DB Transformation that executes a stored procedure which has a transaction in itself.
so to draw a quick picture...
Package
{
Transaction1
{
Data Flow
{
OLE DB Transformation
{
Stored Procedure
{
Transaction2
{
}
}
}
}
}
}
Here's my question:
What would happen if an error occured in the stored procedure (Transaction2)?
Does it behave like SQL Server 2005 where, given a scenario of nested transactions, the innermost transaction is comitted and the outermost transaction is rolled back?
I'm hoping that if the stored procedure decides to rollback Transaction 2 via error handling or if an SQL error occurs that I can rollback Transaction 2 and log an entry in the audit log.
View 1 Replies
View Related
Jan 13, 2006
I have a package with two sequence containers, each containing two SQL tasks and a data flow task, executed in that order. I want to encapsulate the data flow task in a transaction but not the SQL tasks. I have the TransactionOption property set to 'required' on the data flow tasks and 'supported' on the SQL tasks and the sequence containers. When I run the package I get a distributed transaction error on the first SQL task of the second sequence container:
"[Execute SQL Task] Error: Executing the query "TRUNCATE TABLE DistTransTbl2" failed with the following error: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
The only way I can get the package to succeed is to set the TransactionOption = 'required' on the sequence containers and 'supported' on all subordinate tasks. This is not what I want, however. Any ideas?
Thanks,
Eric
View 4 Replies
View Related
Apr 12, 2006
I want to use transactions to protect my tasks. I have ten tasks that need to be completed in a single package. If any of the tasks fail - I need the entire process to rollback.
I have 5 execute sql tasks to truncate groups of tables in my destination database.
After each of the single truncate tasks - I use data flow tasks to copy the data from the source to the destination db.
Both dbs are on the same server.
I am basically copying the entire db - with the exception of a few tables.
package.transactionOption = required ,
and all tasks transactionOptions are set to supported.
Several questions. It seems to hang on the first data flow task - the output window stops, etc.
If I set package.transactionOption = supported - The package will execute.
If I create an error on the thrid truncate task - all previous tasks will complete - the package will fail on step 3 and the truncation for this step is not commited.
I am partially there. Can anyone help point me in the right direction? I need the entire process to commit if all tasks are successful or rollback if any fail.
thank-you in advance
Kim
View 1 Replies
View Related
Aug 8, 2007
Hi Guys,
Here i'm back again on the previous problem of Transaction. I think the problem is coming up because in Dataflow1 i'm referring to a Sql Server table and in DataFlow2 i'm referring to the same table and when they're in transaction they're locked.
How to get rid of this glitch?
Ta
Gemma
View 4 Replies
View Related
Jul 25, 2006
I want to truncate a table (remove all of its data) using an "Execute SQL task" and then populate that table using a Data Flow task. In case of failure, I want to "rollback" the table to its state prior to its truncation.
Can this be done using SSIS Transaction support or is that support aimed exclusively at sql-based flows?
TIA,
barkingdog
View 14 Replies
View Related
Dec 24, 2007
Hi Pals,
I have few queries regarding the transaction management in SSIS.
1. I have a SSIS package in which i have a 2 DataFlow Tasks which basically loads 10,000 records in each table.
2. Then i have one Execute SQL Task which contains an 2 UPDATE statements.
The first UPDATE statement update the table1 which has no issues.It is preetty much straight forward.
Inside the 2nd UPDATE statement, i purposefully updating a numeric column with Alphabets. which throws an Exception.
Since I am taking care of Exception Handling in my stored procedure. So my previous UPDATE will get ROLLBACK'ed as
expected.
The catch here is, As the update statement is failed(i.e Txn is Rollabcked). Do i need to Rollback the entire data loads i.e
10,000 recs into Table T1 and table T2.
In such scenarios how do we deal such things in Real Time.
Do we Rollback the Entire Process. Can you please suggest me how do we takle such situations in SSIS.
Thanks & Regards.
View 2 Replies
View Related
May 21, 2007
Hi,
I made a small SSIS package where I am performing some data transfer operations.
There are two servers A and B
I am getting some data from A , comparing it with some data in Server B and finally inserting some data back in A on the basis of the comparison and logic.
Anyway, the internal logic of SSIS package is not important here. What is important is that since I am deleting the data in Server A before reflooding it from Server B , this SSIS package needs to be in a transaction for obvious data integrity reasons.
I tried to put the "TransactionOption" of the package to "Required" and it fails to acquire connection after that. I do not seem to understand the reason for it because as soon as I revert the transaction option to "Supported" it is able to acquire the connection.
View 2 Replies
View Related
May 26, 2007
Hello everyone, I had been studying the relationship between SSIS Checkpoints and SSIS Transactions.
What I want to do is to create a package with different task, where each one task creates a new transaction, and the same time each task be a checkpoint, it€™s in order to restarts the package from the failure task not from the beginning.
The Transaction-Checkpoint solution contains two packages*:
CkeckpointsAndTransactions1.dtsx and CkeckpointsAndTransactions2.dtsx
Package CkeckpointsAndTransactions1 contains four tasks, task three always fail. The package is configured to use checkpoints and each individual task creates a checkpoint. Additionally, each task creates a new transaction. The package has the TransactionOption setting to NoSupported.
In the CkeckpointsAndTransactions1 package there is something wrong, when the third task fails and I restart the package, the package starts from the beginning, this is wrong!!, the package should restart from the failure task.
In order to the package works like is expected it€™s necessary to add a new task between second and third task. It is also necessary that this new task hasn€™t transaction support. This is shown in the CkeckpointsAndTransactions2 package, in this package after package failure, I restart the package and the package restarts from the failure task, like is expected, but the additional task should not be necessary!!
Does anyone what is wrong in my packages?? How can I to create a package with different task, where each task creates a new transaction, and the same time each task be a checkpoint?
*Please download the BIDS solution from hernan93.files-upload.com (Transaction-Checkpoint.zip file)
View 1 Replies
View Related
Nov 15, 2007
Hi,
I am new to SSIS but have been putting together a relatively complex ETL over the last few weeks. However, I have been stuck on the problem below for the last 4 days and to save my sanity, I would appreciate any help or advice.
Thanks in advance,
jc
I have a 'Control_Upload' package which contains 2 transaction containers in series. Being in series, the transactions should never overlap.
The first transaction container exists within a For Each container and contains several 'Execute SQL' and 'Data Flow' tasks. I have set the 'TransactionOption' on the Transaction container to 'Required' and the tasks within the container are set to a combination of 'Supported' and 'NotSupported'. I have set the IsolationLevel on all 'Supported' tasks to 'ReadUncommited'.
On completion, the second transaction is executed.
The second transaction container also exists within a For Each container and contains 2 'Execute SQL' tasks and 3 'Execute Package' tasks. The invoked packages also contain a ForEach Loop and several 'Execute SQL' and 'Data Flow' tasks. Again, I have set the 'TransactionOption' on the Transaction container in 'Control_Upload' to 'Required' and the tasks within the container are set to a combination of 'Supported' and 'NotSupported'. I have set the IsolationLevel on all 'Supported' tasks to 'ReadUncommited'.
I am experiencing 2 different errors which the SSIS configuration described above.
The first error relates to the first transaction. SSIS executes a number of the 'Execute SQL' and 'Data Flow' tasks which are 'Supported' by the transaction, however, it hangs indefinitely (without any warnings or errors) when it tries to execute the final 'Data Flow' task. The initial tasks execute as expected and the transaction completes if I disable the 'hanging' task. When writing data to tables within all 'Data Flow' tasks, I have the 'Data Access Mode' set to 'Table or view - fast load' and have unchecked the 'Table lock'. For this reason, I do not understand why I seem to be experiencing a potential contention lock!?!
The second error relates to the second transaction. The 3 'Execute Packages' are 'Supported' in the transaction. The first 2 seem to execute successfully but the 3rd returns the following error message when executing one of the 'Data Flow' tasks within the 3rd package.
'SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured. Error code: 0x80004005. And OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "This operation conflicts with another pending operation on this transaction. The operation failed."'.
However, the 3 'Execute Package' tasks are connected in series and like the previous transaction, I have the 'Data Access Mode' set to 'Table or view - fast load' and have unchecked the 'Table lock' within all DB destination components. For this reason, I do not understand why I seem to be experiencing a potential contention lock!?!
Any thoughts would be greatly appreciated.
Sorry for the length and apologies in advance for my overuse of '''''' !!!
View 11 Replies
View Related
Dec 4, 2007
I have an SSIS Package that loads data to a SQL Server table and also logs package statistics along the way with individual SQL statements. In the event of failure, I want the data loaded to the target table rolled back but I want the statistics updates saved to the database. My package consists of several Execute SQL tasks that handle the logging and a Data Flow task that loads the data to the target table along with a couple of event handlers to handle errors. I have the Transaction Option property on the Package set to Required, to Supported on the Data Flow, and to Not Supported on the Execute SQL tasks and the OnError Event Handlers.
When we run the package (and cause an error) everything runs fine until it gets to the On Error event handler for the Data Flow task. This task hangs and never finishes. If we set the Transaction Option for the Event Handler to Supported (allowing it to enlist in the parent transaction) it works but the updates that it makes roll back along with the data from the Data Flow.
Is there a problem with having Event Handlers stay out of a transaction started by the parent package?
Any help would be appreciated.
View 3 Replies
View Related
Jan 5, 2007
Hi:
I would like to have my SSIS tasks to be transacted, but due to infrastructure issues in our network, cannot utilize DTC, because our SQL Boxes are situated where the DTC cannot communicate. Are any other alternatives? Is it a feasible alternative? Please let me know. Thanks.
View 1 Replies
View Related
Jun 2, 2015
I would like to have my SSIS tasks to be transacted, but due to infrastructure issues in our network, cannot utilize DTC, because our SQL Boxes are situated where the DTC cannot communicate. I know we can use execute SQL task with Bein Trans, but I dont think dataflow and all will not be in scope of this and cannot be rollback in case of any error in the underlying tasks.
View 2 Replies
View Related
Jan 10, 2007
Hi,
In our project we have two SSIS package.
And there is a task (Execute SSIS package) in First package that calls the execution of second package.
I m continuously receiving an error "Failed to decrypt protected XML node "PackagePassword" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available."
As we are running first package by job, job runs successfully logging above error
The protection level of second package is set to "EncryptSensitiveWithUserKey"
Can anybody please suggest how to handle it?
View 4 Replies
View Related
Mar 6, 2008
I have a SSIS job, one of the last steps it performs is to execute a SQL 2000 DTS package. This has to be done as a SQL 2000 DTS package as it is performing rebuilds of SQL 2000 Analysis Services dimensions and cubes. We've found that when the DTS fails the SSIS job is happily completing showing as a success, we would prefer to know it went wrong.
As far as I'm aware SSIS merely starts the DTS off and doesn't care about it's result. I've taken a look in to turning on the logging for the execute DTS package and thought that the ExecuteDTS80PackageTaskTaskResult would give me the answer I need...but is merely written to the log not available as an event-handler. It also looks like it is not safe to put a SQL task in as the next item to go look at the SQL 2000 system tables to look at the log for the DTS package as the SSIS documentation warns that the DTS package can continue to run after the execute DTS package task has ended.
Ideally I want any error raised within the DTS package to cascade up to be an error in the SSIS job, I can then handle it appropriately. I cannot find a way to do this. Is there a way?
If not, can anyone suggest how in the remainder of the SSIS tasks I can be sure that the DTS has completed before I start any other tasks that will check for the SQL 2000 log of its execution?
View 5 Replies
View Related
Feb 2, 2007
Hi,
I have developed an SSIS package for ETL purpose. I am invoking the SSIS package through .Net console application by referencing the ManagedDTS Assembly. I am able to execute the package in Sql Server 2005 Developer Edition and it runs fine till completion.
But when i try to execute the packahe in Sql Server 2005 Standard edition, by invoking the package through .Net console application the status of the package is failure.
Can any one help me how to over come this problem.
View 1 Replies
View Related
May 2, 2008
Hi All,
I am in the process of moving from a 32-bit SQL Server 2005 Enterprise (9.0.3054) to a 64-bit SQL Server 2005 Enterprise (9.0.3054 with 4 CPUs and 8GB of memory on Win 2003 SP2) and the process has been very frustrating to say the least. I am having a problem with packages that I created on my 64-bit SQL Server. I am importing a few tables from the 32-SQL Server into the 64-bit SQL Server using the Task --> Import to create the package.
Sometimes when I am creating a package I get the following error in a message box:
SQL Server Import and Export Wizard
The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered. The wizard cannot continue and it will terminate.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (System.Windows.Forms)
Other times when I run a package that has run successfully before I get the following error:
Faulting application dtexecui.exe, version 9.0.3042.0, stamp 45cd726d, faulting module unknown, version 0.0.0.0, stamp 00000000, debug? 0, fault address 0x025d23f0.
Other times I get this error message:
.NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error (79FFEE24) (80131506)
And still other times
The package appears to hang when running. By this I mean that the Package Execution Progress shows progress up to a point then it just stops. (The package takes about 17 seconds to run normally) CPU usage is at 1% and the package cannot be stopped.
I have deleted and re-created the package several times and I have also re-installed the service pack on the SQL Server (9.0.3054) but that did not help.
Does anyone have any other suggestions to try?
Thanks.
View 4 Replies
View Related
Feb 21, 2008
I would like to standardize SSIS development so that developers all start with the same basic template. I have set it up so it is an available template ( http://support.microsoft.com/kb/908018 ) but I would like it to be the default when a new project or package is created. Is this an option?
View 4 Replies
View Related
Jun 3, 2014
I would like to fetch the data flow component name while package is executing. Since system variable named [System::SourceName] only fetches name of the control flow tasks? Is there a way to capture them?
View 5 Replies
View Related
Dec 6, 2007
Hi there
We have a SSIS run which runs as follows
The master package has a configuration file, specifying the connect strings
The master package passes these connect-strings to the child packages in a variable
Both master package and child packages have connection managers, setup to use localhost. This is done deliberately to be able to test the packages on individual development pc€™s.
We do not want to change anything inside the packages when deploying to test, and from test to production. All differences will be in the config files (which are pretty fixed, they very seldom change). That way we can be sure that we can deploy to production without any changes at all.
The package is run from the file system, through a job-schedule.
We experience the following when running on a not default sql-server instance (called dkms5253uedw)
Case 1:
The master package starts by executing three sql-scripts (drop foreign key€™s, truncate tables, create foreign key€™s). This works fine.
The master package then executes the first child package. We then in the sysdtslog get:
Error - €ścannot connect to database xxx€?
Info - €śpackage is preparing to get connection string from parent €¦€?
The child package then executes OK, does all it€™s work, and finish. Because there has been an error, the master package then stops with an error.
Case 2:
When we run exactly the same, but with the connection strings in the config file pointing to the default instance (dkms5253), the everything works fine.
Case 3:
When we run exactly the same, again against the dkms5253uedw instance, but now with the exact same databases defined in the default instance, it also works perfect.
Case 4:
When we then stop the sql-server on the default instance, the package faults again, this time with
Error - €śtimeout when connect to database xxx€?
Info - €śpackage is preparing to get connection string from parent €¦€?
And the continues as in the first case
From all this we conclude, that the child package tries to connect to the database before it knows the connection string it gets passed in the variable from the master package. It therefore tries to connect to the default instance, and this only works if the default instance is running and has the same databases defined. As far as we can see, the child package does no work against the default instance (no logging etc.).
We have tried delayed validation in the packages and in the connection managers, but with the same results (error).
So we are desperately hoping that someone can help us solve this problem.
Thanx,
/Nils M - Copenhagen
View 3 Replies
View Related
May 21, 2007
hi,
I am interested in Passing value from a child Package variable to the Parent package that calls it in ssis.
I am able to call the Child package using the execute package task and use Configurations to pass values from the parent variable to the child, but I am not able to pass the value from the child to the parent.
I have a variable called datasetId in both the parent and child. it gets computed in the child and needs to be passed to the parent...
Any suggestions?
Thanks for any help in advance..
smathew
View 8 Replies
View Related
Sep 10, 2007
Deployed Report having SSIS package as source do not work when Indirect Package configuration is used in ETL package. It seems ETL package when called/executed from Report manager does not recognize environment variable to pick up the dtsconfig file.
The Report works when Direct package configuration is used to same dtsconfig file.
What could be the reason? Any solution for this? This will cause our build/deployment to QA and Prod very difficult.
View 1 Replies
View Related
Jul 6, 2006
Dear All,
I now have two SSIS package, "TESTING" and "LOADING". The "TESTING" package have an execute package task that call the "LOADING" package. When I want to execute the TESTING package, how can I setup the connection string so that I can edit the password of the database connected by the "LOADING" package?
Regards,
Strike
View 8 Replies
View Related
Oct 13, 2007
I have two SSIS packages in a project, one calling the other. The parent package works fine in my local mechine. After they are deployed to the production, I schedeul jobs to run the packages in the SqlServer. The child package works fine if I run it alone, but the parent package could not find its child package if I run the parent package . As I checked, all xml config files and the connection string pointing to the child package were set correctly. It seems the parent package did not use the xml config file. Can someone help me? Thanks in advance.
View 9 Replies
View Related
Mar 25, 2008
I have successfully created a SSIS package which execute a DTS 2000 package and with no problem to execute the task. But I failed to schedule this package. I was not success in setting the logging. When running the package in command line:
dtexec file "C:Documents and SettingslyangMy DocumentsVisual Studio 2005ProjectsTraingDTSTraingDTSDTSTraining.dtsx"
Error: 2008-03-24 08:03:24.36
Code: 0xC0012024
Source: Execute DTS 2000 Package Task
Description: The task "Execute DTS 2000 Package Task" cannot run on this edit
ion of Integration Services. It requires a higher level edition.
End Error
Warning: 2008-03-24 08:03:24.38
Code: 0x80019002
Source: DTSTraining
Description: 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 M
aximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Any help will be greatly appreciated.
(32 bit machine, standartd edition of SQL 2005)
View 7 Replies
View Related
Sep 8, 2006
Hi,
I am making use of the DtUtil tool to deploy my package to SQL Server.
Following is my configuration:
32-bit machine and 32-bit named instance of Yukon.
I have some package variables which need to be set in the code.
Previously I did it as follows:
Set the package variables in the code. For example:
pkgFile.Variables["User::DestinationServerName"].Value = <myvalue>
Deploy the package as follows:
applnObj.SaveToSqlServer(pkgFile, null,
destinationServer, null, null);
Here the package was successfully deployed and when i open those packages using BIDS, I am able to see that the variables are set to the values as doen in teh code.
Because of oen problem I am not using SaveToSQLServer method. So I switched to DTUtil tool.
Now I am doing it this way:
Set the package variables as before.
Deploy the package to SQL Server using DTUtil tool.
Now is the problem:
The package is successfully deployed. But the variables are not set to the value that I have specified in the code.
I also tried DTexec utility to set the package variable. Even that does n't work.
Can anyone help me out? Is there any alternate method to set package variables?
Thanks,
Sandhya
View 8 Replies
View Related
May 22, 2005
Hi there,
I have decided to move all my transaction handling from asp.net to stored procedures in a SQL Server 2000 database. I know the database is capable of rolling back the transactions just like myTransaction.Rollback() in asp.net. But what about exceptions? In asp.net, I am used to doing the following:
<code>Try 'execute commands myTransaction.Commit()Catch ex As Exception Response.Write(ex.Message) myTransaction.Rollback()End Try</code>Will the database inform me of any exceptions (and their messages)? Do I need to put anything explicit in my stored procedure other than rollback transaction?
Any help is greatly appreciated
View 3 Replies
View Related
Nov 6, 2007
when i run the job using network service account credentials job is failing. But when i run the package individually, it is tasting success. when it runs as job, this is the error message i am getting
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
I have changed to 32-Bit run time and ran the excel package, even then it is failing...i tried to use my credentials (i am admin on the box), even then it is failing...please suggest
View 1 Replies
View Related
Aug 27, 2007
Hello
Can anybody help me out in
1) implementing cursors in SSIS. I want to process each row at a time from a dataset. I was trying to use Foreachloop container but in vain. Can you please answer in detail.
my few other questions are:
1) Can i do nested inner join in SSIS. If yes, how? ( I have three table i need to join Tab1 to table 2 and get join the table 3 to get the respective data)
2) I have a resultsets. I want to split the data according to data in a col.
Say for instance:
Col1 Col2
A 1
A 2
B 3
C 4
C 5
i want to split the data according A, B and C . i.e., if Col1= A then do this, if Col1= B then do this..etc. How can i do this using conditional split task in SSIS
View 6 Replies
View Related
Jan 22, 2007
running ssis package with ssis run time compoenents and sql server 2000...
Is it possible to run ssis packages that point to servers on sql server 2000
without installing sql server 2005 ?
Can we just install runtime for ssis and run the packages ?
Please explian with links if possible
thanks a lot
View 18 Replies
View Related
Oct 9, 2015
I want to achieve the following in (SSIS/SSDT for SQL 2012) -Â
I have a generic SSIS package which simply sends out email notifications using SMTP email task (this package is within its own project, and has project level input parameters).
I need to be able to call this package in the Event handler section of every package (numbering in about less than 60) that we have. These packages are within their own respective projects.
I thought I could use the "execute package task", but it turns out , using this, I cannot call a package that is part of some other project. I also cannot call a package that is stored in the CATALOG. Is there any way I can do this ?
When I call the child package , I should be able to send in parameters like - error information and package name of the Parent package.
View 8 Replies
View Related
Oct 29, 2007
I have an SSIS package (TransAgentMaster) that I recently modified to include a call to a child package via the file system. The child package creates a text file. When I run the package in dev studio then the child package/text file is produced.
I then imported the TransAgentMaster as a stored packagesfilesystem package into SQL SSIS and executed the package. The child package produced the text file.
I then ran the SQL Server Agent to see if the child package would work and it did not generate the text file. Thus after updating a SSIS package importing the package into SSIS the job that calls the package will not call the child package. Please not that the TransAgentMaster package calls 7 children packages €¦ just not my new one.
Any thoughts why the agent will not run the child newly crated childe package?
View 3 Replies
View Related