1.如果没有启用xp_cmdshell,请执行以下启用,本人亲自操刀备份到内网其它机器通过,如果对您有用,请评论点赞!
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;

2.创建映射

exec master..xp_cmdshell 'net use Z: \\192.168.1.110\D$\Backup 123456 /user:192.168.1.110\administrator'

注:服务器密码123456;用户名是administrator 这里需要你建立一个用户,否则无法登录1.110这台机器,同时该文件需要共享
这里是在数据库映射一个虚拟Z盘,当你备份时可以手选Z盘或者用以下命令备份都可以,我这里是按界面操作备份的。
3.备份数据库
  
backup database test to disk='\\192.168.1.110\D$\Backup\test.bak' with init
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写