Arise P. Song-曾经的你(风)

转型是必然的,发展才是硬道理

SQLserver 2k backup

WAY_1(diff backup)

declare @currww nvarchar(15),
@filename nvarchar(50)
set @currww=datename(weekday,getdate())
set @filename='d:/mssql/backup/portal1_prof_diff'+@currww+'.dat'
backup database portal1_prof
to disk=@filename
with differential

set @filename='d:/mssql/backup/portal1_serv_diff'+@currww+'.dat'
backup database portal1_serv
to disk=@filename
with differential

set @filename='d:/mssql/backup/portal1_site_diff'+@currww+'.dat'
backup database portal1_site
to disk=@filename
with differential

set @filename='d:/mssql/backup/sps01_config_db_diff'+@currww+'.dat'
backup database sps01_config_db
to disk=@filename
with differential

WAY_2(full backup)

declare @currww nvarchar(15),
@filename nvarchar(50)
set @currww=datename(weekday,getdate())
set @filename='d:/mssql/backup/master_full'+@currww+'.dat'
backup database master
to disk=@filename

set @filename='d:/mssql/backup/portal1_prof_full'+@currww+'.dat'
backup database portal1_prof
to disk=@filename

set @filename='d:/mssql/backup/portal1_serv_full'+@currww+'.dat'
backup database portal1_serv
to disk=@filename

set @filename='d:/mssql/backup/portal1_site_full'+@currww+'.dat'
backup database portal1_site
to disk=@filename

set @filename='d:/mssql/backup/sps01_config_db_full'+@currww+'.dat'
backup database sps01_config_db
to disk=@filename

WAY_3(log backup)

declare @currww nvarchar(15),
@filename nvarchar(50)
set @currww=datename(weekday,getdate())
set @filename='d:/mssql/backup/portal1_prof_log'+@currww+'.dat'
backup log portal1_prof
to disk=@filename

set @filename='d:/mssql/backup/portal1_serv_log'+@currww+'.dat'
backup log portal1_serv
to disk=@filename

set @filename='d:/mssql/backup/portal1_site_log'+@currww+'.dat'
backup log portal1_site
to disk=@filename

set @filename='d:/mssql/backup/sps01_config_db_log'+@currww+'.dat'
backup log sps01_config_db
to disk=@filename

阅读更多
文章标签: sql database disk
想对作者说点什么? 我来说一句

sqlserver驱动包

2011年04月04日 355KB 下载

没有更多推荐了,返回首页

不良信息举报

SQLserver 2k backup

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭