Results 1 to 3 of 3

Thread: backup a table

  1. #1
    Join Date
    Jul 2015

    Unanswered: backup a table

    Hello, can you help me? I need to backup a single table in SQL server. I use SQL Server 2008 r2 and this is new for me

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Simplest way to make a copy of a table:
    SELECT *
    INTO   NewDestinationTableName
    FROM   TableToBeBackedUp
    This will create a table called NewDestinationTableName with all the data from TableToBeBackedUp
    Home | Blog

  3. #3
    Join Date
    Jan 2003
    Provided Answers: 11
    Remember one important thing, though. Assuming you have looked for a simple command to do this, and found there is no BACKUP TABLE statement, you should be aware there is a reason this simple command has been left out of SQL Server. This is because table level backups can not be supported. If you need to "restore" this "backup", you will have to deal with a lot of data integrity issues with tables that have foreign keys associated with it, whether these keys are only enforced by the application (as so many developers love to think they can do), or by actual SQL Server constraints.

    Another thing to think about is having a lot of "backup tables" in your database will get pretty messy pretty quickly. Make sure you drop these tables before everyone forgets what they were for, and no one wants to drop them as they may have become critical for the application to work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts