孤独海岸线 发表于 2018-10-12 09:23:43

SQL Server 2005 如何自动备份数据库

http://wangchengxi.com/blog/wp-content/uploads/004.jpg  DECLARE @strPath NVARCHAR(200)
  set @strPath = convert(NVARCHAR(19),getdate(),120)
  set @strPath = REPLACE(@strPath, ':' , '.')
  set @strPath = 'D:\bak\' + @strPath + '.bak'
  BACKUP DATABASE TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

页: [1]
查看完整版本: SQL Server 2005 如何自动备份数据库