SQL SERVER 2005数据库 [英] SQL SERVER 2005 DATABASE

查看:72
本文介绍了SQL SERVER 2005数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server 2005中合并两个数据库,通过c#具有相同的结构,但数据不同,因为两个女孩正在自己的系统上工作......我们不想把数据库放在服务器上而我们不能接受把它放在网络上,因为距离太多......而且他们都能够更新和插入数据......怎么做......请帮帮我

how to merge two database in sql server 2005 through c# having same structure but data is different because two girls are working on this on their own system..AND WE DONT WANT TO PUT THE DATABASE ON SERVER AND WE ARE NOT ABLE TO PUT IT ON NETWORKING BECAUSE DISTANCE IS TOO MUCH...and they both are able to update and insert data....how to do that...please help me out

推荐答案

简单的答案是,这是不可能的(据我所知)。

您可以合并表,存储过程,视图等(以及数据或通过 Microsoft SQL Server数据库发布向导1.1 生成脚本,无数据) a href =https://www.microsoft.com/en-in/download/details.aspx?id=5498target =_ blanktitle =新窗口> ^ ]



参考: SQL服务器SQL Server数据库的数据发布向导 - 请参阅:http://www.sqlservergeeks.com/sql-server-data-publishing-wizard-for-sql-server-databases/#sthash.mG6p8LS2.dpuf [ ^ ]



但您无法在未通过LAN / WAN / Internet等连接的两个位置插入/更新/数据。您必须在PC之间建立任何连接然后你必须配置其中一个行为像服务器。



希望我能正确理解你的关注。



谢谢:)
Simple answer is NO, It is not possible (as far I know).
You can merge tables,stored procedures, views etc (along with data or without data) by generating scripts through Microsoft SQL Server Database Publishing Wizard 1.1 [^]

Reference: SQL Server Data Publishing wizard for SQL Server databases - See more at: http://www.sqlservergeeks.com/sql-server-data-publishing-wizard-for-sql-server-databases/#sthash.mG6p8LS2.dpuf[^]

But you can not insert/update/data at two locations not connected through LAN/WAN/Internet etc. You have to have any connectivity between the PCs and then you have to configure one of them to behave like server.

Hopefully, I understood your concern correctly.

Thanks :)

我不确定你说合并两个数据库是什么意思,因为通常,merge意味着通过在一个表中根据另一个表中找到的差异插入,更新或删除行来同步数据库。请参阅:

MERGE(Transact-SQL) [< a href =https://msdn.microsoft.com/en-us/library/bb510625.aspxtarget =_ blanktitle =New Window> ^ ]

数据库镜像和复制(SQL Server) [ ^ ]

备份和还原合并复制的策略 [ ^ ]



好​​像,你想把它们连在一起得到一个结果组。困难的是数据类型不同。因此,您需要在数据类型之间进行转换。

请参阅:

UNION [ ^ ]

CAST AND CONVERT [ ^ ]
I'm not sure what you mean by saying merge two databases, because normally, merge mean synchronize database by by inserting, updating, or deleting rows in one table based on differences found in the other table. Please, see:
MERGE (Transact-SQL)[^]
Database Mirroring and Replication (SQL Server)[^]
Strategies for Backing Up and Restoring Merge Replication[^]

Seems, you want to join them together to get one result set. The difficult is that the data types are different. So, you need to convert them between data types.
Please see:
UNION[^]
CAST and CONVERT[^]


这篇关于SQL SERVER 2005数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆