--挂在远程共享目录,需在SQLSERVER服务账号的session下执行 sp_configure 'show advanced options',1 go reconfigure go sp_configure 'xp_cmdshell',1 go reconfigure go xp_cmdshell 'net use z: \\129db138\sqlbak "PASSWORD" /user:"DOMAIN\LOGIN"' go sp_configure 'xp_cmdshell',0 go reconfigure go sp_configure 'show advanced options',0 go reconfigure Go在使用sqlagent启动账号登陆的SSMS里新建查询,然后执行上述语句,注意修改相应的路径和账号、密码 可以实现远程备份路径的挂载
LZ 可以考慮一下 共享文件夹 和 FTP 这两个方式 。
建一个共享文件夹sm,然后在查询分析器中执行 backup database dba to disk='\\192.168.1.200\sm\a.bak'
--挂在远程共享目录,需在SQLSERVER服务账号的session下执行
sp_configure 'show advanced options',1
go
reconfigure
go
sp_configure 'xp_cmdshell',1
go
reconfigure
go
xp_cmdshell 'net use z: \\129db138\sqlbak "PASSWORD" /user:"DOMAIN\LOGIN"'
go
sp_configure 'xp_cmdshell',0
go
reconfigure
go
sp_configure 'show advanced options',0
go
reconfigure
Go在使用sqlagent启动账号登陆的SSMS里新建查询,然后执行上述语句,注意修改相应的路径和账号、密码
可以实现远程备份路径的挂载
backup database dba to disk='\\192.168.1.200\sm\a.bak'