Allows an individual table to be backed up.
For additional syntax information for the DUMP statement, see the Microsoft SQL Server Transact-SQL Reference.
Dumping a table:
DUMP TABLE [[database.]owner.]table_name
TO dump_device [, dump_device2 [..., dump_device32]]
[WITH options]
where
This statement backs up a single database table. By backing up specific tables, you can conserve system resources, save time by backing up only tables that have changed, and target high-volume tables for regular backups.
When you anticipate loading individual tables, use DUMP TABLE. DUMP TABLE locks the table and provides an exact snapshot of the table data. When tables have FOREIGN KEY constraints, you can cause the database to be logically inconsistent if conflicting transactions have occurred since the time of the backup.
Important If data manipulation transactions were occurring on the table when the dump was performed, the data in the table may be logically inconsistent because outstanding transactions would not be reapplied.
Load a full table from a database dump only in disaster recovery situations.
A striped dump is created when more than one dump device is specified. Dumping to multiple devices can improve the performance of the dump because pages can be written to multiple dump devices at the same time. For DISK and FLOPPY devices, you must load from the same number of devices as you dumped to . For TAPE and PIPE devices, you can load from fewer devices than were dumped to. For example, if a database is dumped to four tape drives, you can load from one tape drive. The tapes can be loaded in any order, and a message will prompt you to change tapes.
For compatibility, database dumps from SQL Server 6.0 can be loaded into SQL Server 6.5 when the same sort order is running on both SQL Servers. The dump must be a full database dump and must occur when there is no update activity in the database. For this reason, it is recommended that the dump occur when SQL Server is started in single-user or read-only mode. After the database is successfully loaded, the database is upgraded.
The trace flag 3002 causes a SQL Server 6.5 to dump databases that can be loaded into SQL Server 6.0, Service Pack 3. It is recommended that the SQL Server 6.5 database be started in single-user or read-only mode before making the dump. A SQL Server 6.5 master database cannot be restored to a SQL Server 6.0 server.
A disk backup uses WITH INIT. A tape backup uses WITH NOSKIP and WITH NOUNLOAD, but not WITH INIT.
For more information about the DUMP statement, see the Microsoft SQL Server Transact-SQL Reference.
This example creates the disk_dev1 dump device and then dumps the employees table to the disk_dev1 disk.
EXECUTE sp_addumpdevice 'disk','disk_dev1','c:\MSsql\dumps\diskdev1.dmp' DUMP TABLE employees TO disk_dev1 WITH STATS
SELECT permission is required to dump a table.