备份数据库的T-SQL语句

--创建设备
sp_addumpdevice 'disk','device1','c:/bak/device1.bak'
--完全备份
backup database demo
to device1
with name = 'full backup'
--差异备份
backup database demo
to device1
with DIFFERENTIAL,
name=' 差异1',
description='差异备份',
password='123'
--日志备份
backup log demo
to device2
with name='log1'
--文件/文件组备份
backup database demo
filegroup='primary'
--或
file=' 演示数据库_data'
to device2
with name='filegroup backup1'
 
notice:
   with name='名称',
        description='描述名称'
posted @ 2010-08-02 10:20  y0umer  阅读(122)  评论(0编辑  收藏  举报