Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6362521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:55:08+00:00 2026-05-24T23:55:08+00:00

My organization is upgrading to SQL Server 2008 from 2000 (yay!) and I am

  • 0

My organization is upgrading to SQL Server 2008 from 2000 (yay!) and I am unfamiliar with the inter workings of Integration Services.

I currently manage very large databases that store business process transactions that amount to between 500000 and 1000000 transactions daily. We’ve had very poor management of the databases in the past and they have thus grown to an unmaintainable size. I’m working to provide daily archival of the databases so that the working databases are more manageable. I wrote several stored procedures to do an archive and subsequently prune the working databases. However, in dabbling with Integration Services, I’ve found great built in functionality for the job that my SPs currently do.

What I’ve created are several SSIS packages that perform an export/import. Since I’m only interested in certain data, I use a custom query in the packages that is of the form:

DELETE TransactionTable
OUTPUT
DELETED.*
WHERE (EventTimestamp >= 
DATEADD(D, 0, DATEDIFF(D, 0, (SELECT MIN(EventTimestamp) FROM TransactionTable)))
)
AND (EventTimestamp < 
DATEADD(HH, 0, (DATEADD(YY, -1, DATEDIFF(D, 1, GETDATE()))))
);

This query grabs the data I’m interested in and deletes it from the working table. Using SSIS, this query produces the output that is placed into the archive table.

My question(s) are:
Since I want to import records into my archive and delete those records from the working database within the same SSIS package to ensure consistency, this query seems to be the way to do it. However, I’m concerned about the structure of the transaction. I’m deleting records from my working database as output to be inserted into my archive database.
How does SQL Server handle errors in this case?
Is running this package safe?
What happens if the output generated by the statement is invalid and an error occurs?
Does the statement get rolled back?
Will the DELETE only be committed if all of the output was able to be transferred to the archive?
If not, how might I be able to achieve a fail-safe condition?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:55:08+00:00Added an answer on May 24, 2026 at 11:55 pm

    The good news is, you can set the SSIS package to rollback a set of tasks if any failure occurs.

    There is a TransactionOption property that is available on pretty much every container/task, including the package itself. You can set it to Required, Supported, and NotSupported.

    You can details on each option here: http://msdn.microsoft.com/en-us/library/ms137690.aspx

    Obviously play around with this a bit, forcing errors on different steps to see what the result is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My organization currently delivers a web application primarily based on a SQL Server 2005/2008
Background: My organization uses Microsoft .Net (3.5) with SQL Server 2005 as back end.
My organization is in the process of upgrading from Access 2003 to Access 2007.
For the most part my organization is happy with WSS 3.0 (no upgrading to
The organization I currently work for an organization that is moving into the whole
Our organization provides a variety of services to our clients (e.g., web hosting, tech
My organization is rewriting our database-driven website from scratch including a brand new database
Our organization recently got TFS 2008 set up ready for our use. I have
The organization I currently work for uses SVN for developing PHP applications. Our development
I work on a large project in an organization that is (slowly) upgrading our

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.