Table level backup

  • Hi All,

    I want to know table level backup mean.....

    select * into Table1_bak from Table1

    Then export the data... Is it correct?

    If wrong please explain me.....

    Thanks in advance...

    Satish

  • Yes, It will create the backup of a table

    SELECT * INTO TABLE_BAK_ FROM TABLE1

    Regards,

    Syed Jahanzaib Bin Hassan

    MCTS|MCITP|OCA|OCP|OCE|SCJP|IBMCDBA

    My Blog

    http://www.aureus-salah.com

    Regards,
    Syed Jahanzaib Bin Hassan
    BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

    My Blog
    www.aureus-salah.com

  • Thank you,

    But i am not understand what is the importance because in that database only already we have table, then why we take only one table & that is also as like copy of table...

    Will you explain me please.......

  • You could call that table-level backup, but it's really just making a copy of the table within the same database. SQL doesn't have the ability to backup tables (using the BACKUP statement). Just database, filegroup or file.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Is it importent to take the backup of importent table?

  • I'd prefer a good backup strategy of the entire database, rather than exports of a single table.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I've most often seen this technique used prior to doing manual data manipulation on the source table so you have an easily accessible copy of the original data.

    Also, using it with a 'where 1 =0' is useful for spinning up an empty table with the same table definition.

  • JeffRush (4/17/2011)


    I've most often seen this technique used prior to doing manual data manipulation on the source table so you have an easily accessible copy of the original data.

    Also, using it with a 'where 1 =0' is useful for spinning up an empty table with the same table definition.

    Spot on. 🙂

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply