Table-level backup

前端 未结 16 1571
孤城傲影
孤城傲影 2020-12-02 06:37

How to take table-level backup (dump) in MS SQL Server 2005/2008?

相关标签:
16条回答
  • 2020-12-02 07:21

    You can run the below query to take a backup of the existing table which would create a new table with existing structure of the old table along with the data.

    select * into newtablename from oldtablename
    

    To copy just the table structure, use the below query.

    select * into newtablename from oldtablename where 1 = 2
    
    0 讨论(0)
  • 2020-12-02 07:23

    This is similar to qntmfred's solution, but using a direct table dump. This option is slightly faster (see BCP docs):

    to export:

    bcp "[MyDatabase].dbo.Customer " out "Customer.bcp" -N -S localhost -T -E
    

    to import:

    bcp [MyDatabase].dbo.Customer in "Customer.bcp" -N -S localhost -T -E -b 10000
    
    0 讨论(0)
  • 2020-12-02 07:23

    Handy Backup automatically makes dump files from MS SQL Server, including MSSQL 2005/2008. These dumps are table-level binary files, containing exact copies of the particular database content.

    To make a simple dump with Handy Backup, please follow the next instruction:

    1. Install Handy Backup and create a new backup task.
    2. Select “MSSQL” on a Step 2 as a data source. On a new window, mark a database to back up.
    3. Select among different destinations where you will store your backups.
    4. On a Step 4, select the “Full” backup option. Set up a time stamp if you need it.
    5. Skip a Step 5 unless you have a need to compress or encrypt a resulting dump file.
    6. On a Step 6, set up a schedule for a task to create dumps periodically (else run a task manually).
    7. Again, skip a Step 7, and give your task a name on a Step 8. You are finished the task!

    Now run your new task by clicking on an icon before its name, or wait for scheduled time. Handy Backup will automatically create a dump for your database. Then open your backup destination. You will find a folder (or a couple of folders) with your MS SQL backups. Any such folder will contains a table-level dump file, consisting of some binary tables and settings compressed into a single ZIP.

    Other Databases

    Handy Backup can save dumps for MySQL, MariaDB, PostgreSQL, Oracle, IBM DB2, Lotus Notes and any generic SQL database having an ODBC driver. Some of these databases require additional steps to establish connections between the DBMS and Handy Backup.

    The tools described above often dump SQL databases as table-level SQL command sequence, making these files ready for any manual modifications you need.

    0 讨论(0)
  • 2020-12-02 07:26

    BMC Recovery Manager (formerly known as SQLBacktrack) allows point-in-time recovery of individual objects in a database (aka tables). It is not cheap but does a fantastic job: http://www.bmc.com/products/proddocview/0,2832,19052_19429_70025639_147752,00.html

    http://www.bmc.com/products/proddocview/0,2832,19052_19429_67883151_147636,00.html

    0 讨论(0)
  • 2020-12-02 07:27

    Create new filegroup, put this table on it, and backup this filegroup only.

    0 讨论(0)
  • 2020-12-02 07:27

    You probably have two options, as SQL Server doesn't support table backups. Both would start with scripting the table creation. Then you can either use the Script Table - INSERT option which will generate a lot of insert statements, or you can use Integration services (DTS with 2000) or similar to export the data as CSV or similar.

    0 讨论(0)
提交回复
热议问题