最好有个源代码什么的?谢谢

解决方案 »

  1.   

    可以用SELECT...INTO语句把所有的表一一倒腾过来,但是里面的存储过程怎么办?
      

  2.   

    sql server 2005本身提供了备份/还原功能,不过分离/附加更好用。
      

  3.   

    A)先备份到服务器,然后下载备份文件到本地。
    B)建立VPN,将本地的目录可写共享,SQL Server 的备份目的地指向这个共享目录(需要先映射成网络驱动器)。
     参考http://blog.csdn.net/friendliu/archive/2010/05/12/5583173.aspx如果网络不稳定还是用A方案,可以用断点续传软件下载。
      

  4.   

    方法:(1)将数据备份在远程的服务器中。
    (2)远程共享某个目录
    (3)将远程数据备份文件拷贝到本地机中
    (4)清除远程共享的目录这里主要用到的是sqlserver中内部的函1.清除老的c:\temp2的文件,并新建c:\temp2'文件
    cnn0.Execute "exec master..xp_cmdshell 'rd c:\temp2'"
    cnn0.Execute "exec master..xp_cmdshell 'md c:\temp2'"2.共享目录:
    cnn0.Execute "exec master..xp_cmdshell 'net share SQLDATABACK2=C:\temp2'"3.备份文件
    cnn0.Execute "backup database " & s_db_name & " to disk='c:\temp2\" & Date & ".dat'"4.远程复制到指定目录
    fso.copyfile "\\" & serverName & "\SQLDATABACK2\" & Date & ".dat", Trim(Text1), True5.清理文件。
    cnn0.Execute "exec master..xp_cmdshell 'net share SQLDATABACK2 /delete'"
    cnn0.Execute "exec master..xp_cmdshell 'rd c:\temp2 /s/Q'"
      

  5.   

    cnn0.Execute "exec master..xp_cmdshell 'rd c:\temp2'"实时错误'424'
    要求对象