SQL server backup append to existing database

db , sql server Nepal
  • 13 years ago

    Hi all,
    I have a software system running in my office with MS SQL Server in back end.
    Now ,  I want to backup the database daily and delete all data from database so that only one-day data will be in the database at office.
    And, I want to append this daily data to my system at home so that  all data including old remains at home pc. IS it possible to append daily data from office to my home pc?

  • 13 years ago

    An option for you might be to follow the process below:

    1. Backup the office SQL Server data
    2. Manually Delete/Truncate the data in the office database (or write a stored procedure to do this quickly in a batch) 
    3. On your home PC, restore the data into a holding database
    4. Write some TSQL to insert the data from the holding database into your main database.

     

  • 13 years ago

    Dear fren,

    Thank you for your kind reply. Could you please explain more on these steps?
    I mean, which backup will be the best (full,differential or transaction log). Because I am new to SQL server database backup and restore.

    Thank you

  • 13 years ago

    In this scenario, you'll want to do a full backup because you'll be deleting all of the data in your office database.

    Tim

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Owning a computer without programming is like having a kitchen and using only the microwave oven” - Charles Petzold