Wong's Blog

Always on the way forward
  1. 首页
  2. Windows
  3. 正文

SQL Server备份计划连接共享盘

2023 年 6 月 29 日 93点热度 0条评论

1. 启动XP_cmdshell

方法1: SQL Server右键-方面-方面:外围应用配置器-XPXMDSHELLENABLE:true-确定保存

方法2: 新建查询

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;

2. 创建映射

新建查询:

exec master.sys.xp_cmdshell 'net use Z: \\192.168.0.8\SQLBacK password  /user:192.168.0.8\administrator';

3. 备份数据库

方法1:

backup database testxx to disk='\\192.168.0.8\SQLBacK' with init

方法2:

维护计划选择需要修改的备份计划,备份路径可以选择共享盘

标签: 暂无
最后更新:2023 年 6 月 29 日

wong

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复
  • Linux / 6篇
  • Macos / 7篇
  • Windows / 9篇
  • 其他 / 9篇

在路上 | 2024