首页 新闻 搜索 专区 学院

sqlserver,读写数据库分离问题

0
悬赏园豆:10 [待解决问题]
环境:windows server 2012。
 
  sqlserver读写数据库分离,读写数据库事务性同步。用代码先存储数据到wirte数据库,接着立即从read数据库读取数据,怎么保证读取到的数据就是刚刚写入的数据?
水石相生的主页 水石相生 | 初学一级 | 园豆:142
提问于:2015-04-28 11:11
< >
分享
所有回答(9)
0

不能保证。

爱编程的大叔 | 园豆:30813 (高人七级) | 2015-04-28 11:16
0

分情况吧,

如果对延时的问题超级不克容忍的话,数据库级别还真是没法搞定,只能用内存缓存工具。

如果可以容忍稍稍一点延时,但是不能容忍脏数据,那可以额外弄个时间戳记录来对比下是否最新数据。

其实sqlserver 读写分离性能还是可以的,考虑远一点没错,但是比如半年内都没这个忧虑,可以先把系统做起来先。

arg | 园豆:1047 (小虾三级) | 2015-04-28 11:40
0

读库写库要是能保证这样,还分什么读写啊.直接2个写库不更好

吴瑞祥 | 园豆:29369 (高人七级) | 2015-04-28 12:38
0

读写分离零延时是一种错觉

JeffWong | 园豆:2028 (老鸟四级) | 2015-04-28 15:55
1

读写分离不是为了应对你这种情况吧

 

读写分离是为了提高sql server 服务器的性能 让其不成为瓶颈

将 及时数据 和非及时数据的查询进行分离服务器

及需要 知道及时数据的查询 和增删改 连主服务器

而那些汇众非及时 对实效性要求不高的查询连接 镜像服务器  (会有几秒延时)

小眼睛老鼠 | 园豆:2779 (老鸟四级) | 2015-04-28 16:52
0

不知道你是想用sqlserver自身的功能实现读写分离,还是想通过程序实现读写分离

无论哪种方式,同步的情况都是理想的,即便alwayson,也只能是写入日志的同步,而不是刷新数据的同步

我是大菠萝 | 园豆:365 (菜鸟二级) | 2015-05-12 14:25
0

用数据库索引,来完成查询,删除,录入等操作

夜空下的男子 | 园豆:31 (初学一级) | 2015-08-22 10:22
0
his XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>
SCN: 消息列表 - icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/community/erp/60-upgrade?view=discussions
</link>
<description>Most recent forum messages</description>
<language>en</language>
<pubDate>Fri, 11 Oct 2013 12:34:30 GMT</pubDate>
<generator>
Jive Engage 5.0.6.2 (http://jivesoftware.com/products/)
</generator>
<dc:date>2013-10-11T12:34:30Z</dc:date>
<dc:language>en</dc:language>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430938?tstart=0#14430938
</link>
<description>
<!-- [DocumentBodyStart:bca08907-ecd3-4859-ace2-91831ae47135] --><div class="jive-rendered-content"><p>Hi,</p><p>i wanted to know the entry in the gui when you change...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Also please check that the below services are active in sicf.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p><a class="jive-link-external-small" href="https://service.sap.com/sap/support/notes/1088717"><span class="urTxtH1" style="font-weight: bold;">Note 1088717 - Active services for Web Dynpro ABAP in transaction SICF</span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Thanks</p><p>Rishi Abrol</p></div><!-- [DocumentBodyEnd:bca08907-ecd3-4859-ace2-91831ae47135] -->
</description>
<pubDate>Fri, 11 Oct 2013 12:34:29 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430938?tstart=0#14430938
</guid>
<dc:creator>Rishi Abrol</dc:creator>
<dc:date>2013-10-11T12:34:29Z</dc:date>
<clearspace:dateToText>2013-10-11 下午2:34</clearspace:dateToText>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430774?tstart=0#14430774
</link>
<description>
<!-- [DocumentBodyStart:7d380b66-3cdf-49da-8584-942b80b553d0] --><div class="jive-rendered-content"><p>Hi Rishi,</p><p>Here is the screen shot for GUI as well as host file.</p><p><a href="http://scn.sap.com/servlet/JiveServlet/showImage/2-14430774-296616/Untitled.gif"><img alt="Untitled.gif" class="jive-image jive-image-thumbnail" height="253" onclick="" src="http://scn.sap.com/servlet/JiveServlet/downloadImage/2-14430774-296616/450-253/Untitled.gif" width="450"/></a></p><p>Regards,</p><p>Vishwas</p></div><!-- [DocumentBodyEnd:7d380b66-3cdf-49da-8584-942b80b553d0] -->
</description>
<pubDate>Fri, 11 Oct 2013 12:27:02 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430774?tstart=0#14430774
</guid>
<dc:creator>Vishwasdeep Mehta</dc:creator>
<dc:date>2013-10-11T12:27:02Z</dc:date>
<clearspace:dateToText>2013-10-11 下午2:27</clearspace:dateToText>
<clearspace:replyCount>1</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430930?tstart=0#14430930
</link>
<description>
<!-- [DocumentBodyStart:856a7310-5bfc-4e34-a152-b67e54aaa1ca] --><div class="jive-rendered-content"><p>Hi,</p><p>Please past the entry of the host file.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>How do you login to the GUI? Can you also past me the entry of the gui</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Thanks</p><p>Rishi Abrol</p></div><!-- [DocumentBodyEnd:856a7310-5bfc-4e34-a152-b67e54aaa1ca] -->
</description>
<pubDate>Fri, 11 Oct 2013 12:10:29 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430930?tstart=0#14430930
</guid>
<dc:creator>Rishi Abrol</dc:creator>
<dc:date>2013-10-11T12:10:29Z</dc:date>
<clearspace:dateToText>2013-10-11 下午2:10</clearspace:dateToText>
<clearspace:replyCount>2</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430889?tstart=0#14430889
</link>
<description>
<!-- [DocumentBodyStart:a09a2a52-54a4-48bf-be84-df82835ddd14] --><div class="jive-rendered-content"><p>Hi Rishi,</p><p>I am working on SAP IDES , currently installed on my laptop with windows server 2008. I have disabled firewall also, but still facing the same problem.</p><p>Regards,</p><p>Vishwas</p></div><!-- [DocumentBodyEnd:a09a2a52-54a4-48bf-be84-df82835ddd14] -->
</description>
<pubDate>Fri, 11 Oct 2013 11:56:42 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430889?tstart=0#14430889
</guid>
<dc:creator>Vishwasdeep Mehta</dc:creator>
<dc:date>2013-10-11T11:56:42Z</dc:date>
<clearspace:dateToText>2013-10-11 下午1:56</clearspace:dateToText>
<clearspace:replyCount>3</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430873?tstart=0#14430873
</link>
<description>
<!-- [DocumentBodyStart:6e948b94-f5d0-49d6-8e42-c9528b4a9892] --><div class="jive-rendered-content"><p>Hi,</p><p>First tell me where this server is installed.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>If in different network then you need to ask network team to open port 8044 from server to area where you are accessing the server.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Do you have any remote desktop which is in the network where the server is.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Can you try one more thing replace the host name in the url where eccehp.sap.com</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>If installed on the local desktop try to disable the firewall in that pc in control panel.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Thanks</p><p>Rishi abrol</p></div><!-- [DocumentBodyEnd:6e948b94-f5d0-49d6-8e42-c9528b4a9892] -->
</description>
<pubDate>Fri, 11 Oct 2013 11:50:43 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430873?tstart=0#14430873
</guid>
<dc:creator>Rishi Abrol</dc:creator>
<dc:date>2013-10-11T11:50:43Z</dc:date>
<clearspace:dateToText>2013-10-11 下午1:50</clearspace:dateToText>
<clearspace:replyCount>4</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430716?tstart=0#14430716
</link>
<description>
<!-- [DocumentBodyStart:f12664fe-1554-4ef8-86ee-8334a7581e99] --><div class="jive-rendered-content"><p>Hi Rishi,</p><p>TELNET failed.</p><p>What could be the possible reason for failure ...???</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Regards,</p><p>Vishwas</p></div><!-- [DocumentBodyEnd:f12664fe-1554-4ef8-86ee-8334a7581e99] -->
</description>
<pubDate>Fri, 11 Oct 2013 11:42:44 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430716?tstart=0#14430716
</guid>
<dc:creator>Vishwasdeep Mehta</dc:creator>
<dc:date>2013-10-11T11:42:44Z</dc:date>
<clearspace:dateToText>2013-10-11 下午1:42</clearspace:dateToText>
<clearspace:replyCount>5</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430766?tstart=0#14430766
</link>
<description>
<!-- [DocumentBodyStart:11b3dd93-fc56-4444-8c1f-a3efed6b0ec4] --><div class="jive-rendered-content"><p>PLEASE RE INSTALL YOUR IDES</p></div><!-- [DocumentBodyEnd:11b3dd93-fc56-4444-8c1f-a3efed6b0ec4] -->
</description>
<pubDate>Fri, 11 Oct 2013 11:23:38 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430766?tstart=0#14430766
</guid>
<dc:creator>sumer kaushik</dc:creator>
<dc:date>2013-10-11T11:23:38Z</dc:date>
<clearspace:dateToText>2013-10-11 下午1:23</clearspace:dateToText>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430719?tstart=0#14430719
</link>
<description>
<!-- [DocumentBodyStart:e64ab43d-9c7c-463a-b3b5-5051b8345db7] --><div class="jive-rendered-content"><p>Hi,</p><p>This is Z one can you please try any standard web dynpro.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>like : HAP_MAIN_DOCUMENT</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>another thing what can you please check with your team if port 8044 is open .</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Id there any firewall between the desktop and system eccehp.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>try to do telnet eccehp.sap.com 8044</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Please check if firewall is active if local installation.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Thanks</p><p>Rishi Abrol</p></div><!-- [DocumentBodyEnd:e64ab43d-9c7c-463a-b3b5-5051b8345db7] -->
</description>
<pubDate>Fri, 11 Oct 2013 11:12:39 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430719?tstart=0#14430719
</guid>
<dc:creator>Rishi Abrol</dc:creator>
<dc:date>2013-10-11T11:12:39Z</dc:date>
<clearspace:dateToText>2013-10-11 下午1:12</clearspace:dateToText>
<clearspace:replyCount>6</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430580?tstart=0#14430580
</link>
<description>
<!-- [DocumentBodyStart:7e0fc01e-1fde-46a2-95b4-8a0957495fbd] --><div class="jive-rendered-content"><p>Hi Karthikeyan,</p><p>Still problem is not resolved.</p><p>I maintained both parameters but still not able to run my Web dynpro application.</p><p>I also shared the error screenshot which i am facing.</p><p>Regards,</p><p>Vishwas</p></div><!-- [DocumentBodyEnd:7e0fc01e-1fde-46a2-95b4-8a0957495fbd] -->
</description>
<pubDate>Fri, 11 Oct 2013 10:56:42 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430580?tstart=0#14430580
</guid>
<dc:creator>Vishwasdeep Mehta</dc:creator>
<dc:date>2013-10-11T10:56:42Z</dc:date>
<clearspace:dateToText>2013-10-11 下午12:56</clearspace:dateToText>
<clearspace:objectType>0</clearspace:objectType>
</item>
<item>
<title>
Re: icm/server_port_0 is in unchangeable mode. How to change?
</title>
<link>
http://scn.sap.com/message/14430574?tstart=0#14430574
</link>
<description>
<!-- [DocumentBodyStart:b5011b16-5675-42ae-b9fe-34a8a610382a] --><div class="jive-rendered-content"><p>Hi Rishi,</p><p>Below is error screenshot. I already have entry in host file. But still i m getting the error <img height="16px" src="http://scn.sap.com/1328/images/emoticons/cry.gif" width="16px"/></p><p><a href="http://scn.sap.com/servlet/JiveServlet/showImage/2-14430574-296550/new.gif"><img alt="new.gif" class="jive-image jive-image-thumbnail" height="253" onclick="" src="http://scn.sap.com/servlet/JiveServlet/downloadImage/2-14430574-296550/450-253/new.gif" width="450"/></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Regards,</p><p>Vishwas</p></div><!-- [DocumentBodyEnd:b5011b16-5675-42ae-b9fe-34a8a610382a] -->
</description>
<pubDate>Fri, 11 Oct 2013 10:43:06 GMT</pubDate>
<guid>
http://scn.sap.com/message/14430574?tstart=0#14430574
</guid>
<dc:creator>Vishwasdeep Mehta</dc:creator>
<dc:date>2013-10-11T10:43:06Z</dc:date>
<clearspace:dateToText>2013-10-11 下午12:43</clearspace:dateToText>
<clearspace:replyCount>8</clearspace:replyCount>
<clearspace:objectType>0</clearspace:objectType>
</item>
</channel>
</rss>
zxj19840709 | 园豆:202 (菜鸟二级) | 2015-08-25 18:07
0

无论怎么样 都会有延迟 针对一些一致性要求高的数据 可以读写都从主库 稳妥

西伯利亚狼520 | 园豆:204 (菜鸟二级) | 2021-03-17 13:59
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册