各位大侠:
    我想写一个批处理(batch)文件,来定时把一个数据库中的几个表数据拷贝到另一个数据库中,并且可以设定批处理文件执行的时间,和频率!如何实现?提供帮助者有分!

解决方案 »

  1.   

    两个库如果在一个服务器实例,直接用SQLServer代理调用存储过程就可以了。跨服务器实例的话,bcp和SSIS都可以。
      

  2.   

    Easiest method:(1) create linked server on the source server against the destination server
    (2) write your stored to do batch processing (such as insert into destinationserver.dbo.destinationtable select * from sourcetables)
    (3) schedule the stored proc to run periodically using SQL Server Agent
      

  3.   

    定时作业定制参考:http://blog.csdn.net/htl258/category/582966.aspx
      

  4.   

    要么直接用sql的agent服务中的计划任务,否则直接写sql代码,用osql/isql执行,用操作系统自带的计划任务at/schtasks/tasks来执行也可以,