windows server定时任务

2024-01-08 16:29:01

backup.bat

sqlcmd -S MESSQL01 -i D:\DBBackup\backup.sql

 bakup.SQL

DECLARE @preferredReplica INT
  
SET @preferredReplica = (SELECT
[master].sys.Fn_hadr_backup_is_preferred_replica('TJ_MES'))
  
IF ( @preferredReplica = 1 )
  BEGIN
DECLARE @FileName varchar(1000)
SELECT @FileName = (SELECT 'D:\DBBackup\Files\TJ_MES' + convert(varchar(500), Ge

文章来源:https://blog.csdn.net/lybwwp/article/details/135458594
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。