我试了一个备份,只能在远程服务器上生成备份文件,怎样才能备份到本地呢?

解决方案 »

  1.   

    没做过http://hi.baidu.com/aweiwenyuan/blog/item/9e24dbef3f89df13fcfa3c1f.html
      

  2.   


    方法很多种,sql远程备份只是语句在server这个local上的操作,备份后的文件直接通过网络,比如共享(ipc机制)、ftp、http,甚至mail直接发送到备份机子上即可当然也可以逆向思维,直接客户端定期到服务器某某文件夹去download/copy!!!如直接通过xp_cmdshell调用也可以,-- 连接客户机
    xp_cmdshell 'net use \\clientip /user:clientusername clientpassword'
    xp_cmdshell 'copy x:\xx.mdf \\clientip\sharefolder\ /y'
    xp_cmdshell 'copy x:\xx.ldf \\clientip\sharefolder\ /y'
    -- 如熟悉rar.exe,还可以直接打包传送!
    xp_cmdshell 'net use * /del /y'
    -- 共享需要客户机关闭防火墙,关闭组策略限制,,,,。