您的位置:首页 > 数据库

利用磁盘映射SqlServer远程备份到另一台机器

2015-09-21 15:23 393 查看
1.打开xp_cmdshell
 
EXEC sp_configure'show advanced options', 1
GO
-- To updatethe currently configured value for advanced options.
RECONFIGURE
GO
-- To enablethe feature.
EXEC sp_configure'xp_cmdshell', 1
GO
-- To updatethe currently configured value for this feature.
RECONFIGURE
GO
-- To disallowadvanced options to be changed.
EXEC sp_configure'show advanced options', 0
GO
-- To updatethe currently configured value for advanced options.
RECONFIGURE
GO

2.
exec master..xp_cmdshell'net use z:
\\远程IP\ 远程共享目录"用户密码" /user:
user:远程IP \Administrator'   

3.建立维护计划任务可以选用磁盘映射 若没有执行前两步,在选择磁盘时则找不到远程共享目录 

建立备份

--如果要禁用,
-- To allow advanced options to bechanged.
EXEC sp_configure'show advanced options',1
GO
-- To update the currently configuredvalue for advanced options.
RECONFIGURE
GO
-- To disable the feature.
EXEC sp_configure'xp_cmdshell', 0
GO
-- To update the currently configured valuefor this feature.
RECONFIGURE
GO
-- To disallow advanced options to bechanged.
EXEC sp_configure'show advanced options',0
GO
-- To update the currently configuredvalue for advanced options.
RECONFIGURE
GO
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: