Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to delete a record when the running SSIS package stopped manually.

i designed a package to run only once across a session, to achieve that I insert a record before package started. so other execution will not allow when row exists. if error came or on successful run i deleted the row automatically.

now i have a scenario that the SSIS package stopped manually at that time need to delete the row to allow other session execution.

Kindly help to resolve it.
Posted
Comments
Suvendu Shekhar Giri 1-Nov-15 5:39am    
Anything you have tried so far?
PIEBALDconsult 17-Nov-15 23:35pm    
Redesign.
Patrice T 17-Nov-15 23:41pm    
Weird construction, need details to understand the needs.
There is probably another solution.

The best possible solutions are either you delete the record manually from the database when the SSIS package is stopped manually.

Or Run a job at certain optimum intervals which will automatically delete that record.
So even if you fail to do it manuallt the system will take care of it after certain interval.
 
Share this answer
 
Insert the record with in the package only.
Run the complete package in transaction.
At first step in Package put a condition : if record exists "exit package"
 
Share this answer
 
v2
If SQL Server 2012 or newer, you can query the SSISDB database to determine the status of previous executions. You can use that information rather than a semaphore row.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900