简体   繁体   English

如何在不使用复制的情况下将本地 SQL 服务器数据库的数据同步到远程 SQL 服务器?

[英]How to synchronize data from local SQL Server database to remote SQL Server without using replication?

I have local SQL Server database and want to update data with remote sql database.我有本地 SQL 服务器数据库,想用远程 sql 数据库更新数据。 i am using c# with asp.net.我正在使用 c# 和 asp.net。 How to synchronize data from local SQL Server database to remotely hosted SQL Server database without the use of replication method?如何在不使用复制方法的情况下,将本地 SQL Server 数据库的数据同步到远程托管的 SQL Server 数据库?

I have used replication but did not get success.我使用了复制但没有成功。 I think i have to try again.我想我必须再试一次。 but i need alternative option of replication method.但我需要复制方法的替代选项。

I don't have any specifics on your situation, however if the two SQL servers can communicate with each other directly, you can set up a linked server configuration.我对您的情况没有任何详细信息,但是如果两台 SQL 服务器可以直接相互通信,则可以设置链接服务器配置。

https://docs.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-ver15

Once you have a linked server, you can write cross database queries against both databases using the [ServerName].[DatabaseName].[Owner].[Table] syntax to reference the remote tables.拥有链接服务器后,您可以使用 [ServerName].[DatabaseName].[Owner].[Table] 语法针对两个数据库编写跨数据库查询来引用远程表。 (This assumes the user you are logged in with can access both databases, or you set up the linked server with a passthrough authentication that allows updates to the remote database). (这假设您登录的用户可以访问这两个数据库,或者您使用允许更新远程数据库的直通身份验证设置链接服务器)。

This is a bit of a stretch, since I don't know your configuration.这有点牵强,因为我不知道您的配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有sql server的本地数据库 - Local database without sql server 如何在SQL Server 2008中将表数据从远程服务器复制到本地服务器 - How to copy table data from remote server to Local server in SQL Server 2008 如何将数据从本地SQL Server数据库更新到联机SQL Server数据库? - How to update data from local SQL Server database to online SQL Server database? 从本地数据库到远程数据库的SQL Server和EF迁移 - SQL Server and EF Migration from local to remote database 同步两个本地和远程SQL Server数据库 - sync two local and remote sql server database 使用SQL Server的本地数据库 - local database using SQL Server 如何将远程SQL Server Express数据库部分复制到本地SQL Server Express数据库? - How to do a partial copy of a remote SQL Server Express database to a local SQL Server Express database? 使用Dotmim同步框架同步两个SQL Server数据库 - Synchronize two SQL Server database using Dotmim sync framework 从Windows命令提示符运行本地SQL脚本文件以更新远程SQL Server数据库 - Run local SQL script file from Windows Command Prompt to update remote SQL Server database 使用数据源确定本地SQL Server CE数据库的路径 - Determining the path to the the local SQL Server CE database using Data Source
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM