Table Backup in SQLServer 2005

  • Hi,

    How to take a table backup in specific drive in SQLServer?

    Normally, we take table backup using

    SELECT * INTO new_table_name FROM old_table_name

    if we do so, can we get the table backup with same old table structure (including primary & foreign keys, indexes..) ?

    And more over, we don't get this backup in specific drive. right ?

    Please advise.

    Thanks and Regards,

    Ravi.

  • If you want to recreate the exact schema, script the current table and then rename the table to a "backup" table.

    Then use insert into in order to copy the data.

    Doing it this way permits you to also ensure the table is created in specific filegroups which may be on different drives.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Normally, we take table backup using

    SELECT * INTO new_table_name FROM old_table_name

    if we do so, can we get the table backup with same old table structure (including primary & foreign keys, indexes..) ?

    And more over, we don't get this backup in specific drive. right ?

    That's not the table backup, that's just the duplicity of data and table. And its just the heap table with no indexes and ........

    If you looking for backup a preticular table, then move the table in dedicated filegroup and then do the filegroup backup.

    ----------
    Ashish

  • Thanks Ashish.

    Could you please shed more light on this?

    How we create file group,move table to filegroup ,take filegroup backup ?

    Your help is much appreciated.

    Thanks and Regards,

    Ravi.

  • Google is best person to answer all your latest queries. Just copy paste it in google and you will get best answer.

    ----------
    Ashish

  • Thanks for your advice.

Viewing 6 posts - 1 through 5 (of 5 total)

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