[英]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.