[英]Sql database copy from one server to another server
I am just looking for some advice here as I am quite new to this. 我只是在这里寻找一些建议,因为我对此很陌生。 I have a client who requires a local copy of a SQL database and the same database running on a remote server. 我有一个客户端,该客户端需要SQL数据库的本地副本以及在远程服务器上运行的同一数据库。 the remote database is only kept as a backup and needs to be updated usign the information from the local database nightly. 远程数据库仅作为备份保存,需要每晚使用本地数据库中的信息进行更新。
What would be the best solution for this. 最好的解决方案是什么。 Should I write a C# application to copy the database accross to the live server nightly or does SQL server has something that we can use? 我应该每晚编写一个C#应用程序以将整个数据库复制到实时服务器中吗,还是SQL Server有我们可以使用的东西? If it is C# application do I need to use bulkcopy? 如果是C#应用程序,是否需要使用批量复制? would that also copy over the rows that has been changed or updated as well? 还会复制已更改或更新的行吗?
Any help would be greatly appriciated. 任何帮助将不胜感激。
Use SQL Server Agent and create a job with 3 steps: 使用SQL Server代理并通过3个步骤创建作业:
does it need to be an exact copy? 是否需要准确的副本? Why not blow away the tables each night on the backup and bulkcopy them over on a schedule? 为什么不每晚晚上删除备份表并按计划批量复制它们呢?
您还可以使用Redgate SQL比较SDK之类的工具来计划架构和数据更改,并通过
Here are couple options you can try: 您可以尝试以下几种选择:
How big are these updates? 这些更新有多大? If this is something that doesn't involve too much updates you might be able to do that with linked server and a bit more sophisticated queries. 如果这不涉及太多更新,则可以使用链接服务器和更复杂的查询来完成此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.