且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

具有多个客户端问题的SQL Server

更新时间:2022-10-25 08:27:18

多个客户端插入是您使用SQL Server的主要原因之一 - 因为它非常擅长!我没有听说过它是一个问题或导致问题,并且鉴于每天都有数百万的偏移,这是一个SQL问题,我们已经听说过它已经注意到了它。



所以最可能的原因是它不是SQL问题,而是代码问题,尤其是代码在从SQL报告时处理错误的方式。例如,如果您的代码尝试将一个包含25个字符的新行插入到只需20的字段中,则SQL将引发异常。你的代码忽略了这一点,然后看起来插入工作,但是不会创建新行。



首先看看你的本地系统:是问题发生时有什么共同因素吗?你有什么办法可以强制解决问题吗?然后查看您的代码 - 您如何处理异常?等等。



很抱歉,我们无法访问您的代码和数据,因此我们无法告诉您如何解决此问题!

I faced a issue while using a Single sql server with multiple clients. i have two exe file in two seperate machine. i had configured both machine with that(single) sql server. we are doing some insertion operation from both system. while doing so. some of the record will not be inserted into table. if any body else faced this issue .Kindly Share the Solutions

Multiple client inserts are one of the major reasons that you use SQL Server - because it's very good at them! I have not heard of it being a problem or causing a problem, and given the millions of offsets that are done every day, of this was an SQL problem, we would have heard of it out noticed it ourselves already.

So the most likely reason is that it's not an SQL problem, but a problem with your code, and particularly with how your code handles errors when they are reported from SQL. For example, if your code tries to insert a new row with 25 characters into a field that only takes 20, SQL will throw an exception. Of your code ignores that, then it will appear that the insert worked, but the new row will not be created.

So start by looking at your local system: are there any common factors when the problem occurs? Is there anything you can do to "forced" the problem to occur? Then look at your code - what do you do with exceptions? And so forth.

Sorry, but we don't have access to your code and data, so we can't tell you how to solve this!