问题背景有时候备份在其他机器上面,只能通过远程共享访问,如果要还原这个备份应该怎么做?

 

设 远程机器的IP 为 192.168.51.101

远程共享目录为 \\192.168.51.101\bak\

密码为 password

用户名为 admin

sp_configure 'show advanced options', 1;

GO

RECONFIGURE; --立即生效,否则重启实例生效

GO


sp_configure 'xp_cmdshell', 1;

GO

RECONFIGURE;

GO


exec master..xp_cmdshell 'net use X: \\192.168.51.101\BAK "password" /USER:192.168.51.101\admin'
go

然后再执行还原操作的时候,就看到多出1个X盘,在里面选择bak文件还原即可。

 

相关文章:

  • 2022-02-28
  • 2022-01-06
  • 2021-09-03
  • 2021-05-20
  • 2021-09-27
  • 2021-11-01
  • 2021-12-01
猜你喜欢
  • 2021-08-21
  • 2021-05-19
  • 2021-12-05
  • 2022-01-09
  • 2021-08-31
  • 2021-12-09
相关资源
相似解决方案