zoukankan      html  css  js  c++  java
  • mssqlserver数据库自动备份

    1.新建作业
    2.添加常规
    3.添加步骤,选择T-SQL 输入下面语句(databasename修改为自己的数据库名称.D:bak改为自己的备份路径)

    DECLARE @strPath NVARCHAR(200)
    set @strPath = convert(NVARCHAR(19),getdate(),120)
    set @strPath = REPLACE(@strPath, ':' , '.')
    set @strPath = 'D:ak' + @strPath + '.bak'
    BACKUP DATABASE [databasename] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT 

    4.添加计划,设置频率,时间等
    5.要记得启用 Sql Server Agent 服务

  • 相关阅读:
    代理模式
    适配器模式
    原型模式
    创建者模式
    装饰模式
    web总结
    4.14
    4.14
    POJ2385
    POJ2229
  • 原文地址:https://www.cnblogs.com/adenwei/p/4021302.html
Copyright © 2011-2022 走看看