首页 > 数据库

Ms sqlserver 2005 数据库远程备份

时间:2009-04-23 12:54:29  作者:曹坤  我要投稿
Linux初探欢迎您的投稿,投放方法请点击这里查看,我们会定期赠送精美小礼品给优秀的投稿作者。海纳百川 取则行远!LinuxGoo欢迎您的到来。
--启用xp_cmdshellEXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE; --执行xp_cmdshell,映射一下ex......

--启用xp_cmdshell


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

--执行xp_cmdshell,映射一下
exec master..xp_cmdshell 'net use z: \\192.16.18.2\e$\backup "ade123456" /user:192.16.18.2\administrator'

z:是映射网络路径对应本机的盘符,与下面的备份对应 ,
\\192.16.18.2\e$\backup是要映射的网络路径

192.16.18.2\administrator
192.16.18.2 是远程的计算机IP,
administrator 是登陆的用户名
ade123456 是administrator用户的密码

--关闭xp_cmdshell

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

如果您需转载 Ms sqlserver 2005 数据库远程备份,请注明来自LinuxGoo.com,其版权归原作者所有。请广大网友留言时遵纪守法,使用文明用语。如果您在应用中有什么问题,请在下面留言,我们会尽快解答。
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目热门