SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 SQL returning values out of order - wireless?
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

fwdtech
Starting Member

11 Posts

Posted - 04/04/2006 :  15:17:28  Show Profile
I have no idea why, but at a recent product demonstration the database team setup a SQL 2005 machine onto a wireless network that we were supposed to run our queries against. All was going well for about 2 hours until we noticed that entire records were missing from tables and other weird things were happening. I wrote a quick command line c# program to query the database using LINQ with a stored procedure returning 250 records.

When I viewed the output of 20 queries I noticed rather amazingly that in two (of the 20) record dumps the values printed where literally out of order going "4.5.6.9.7.10.8" instead of being in numerical order. We chalked this up to wireless packet ordering magic and started throwing food at the SQL guys. We grabbed the SQL machine and shoved it under our table during a break connecting the two machines directly using a switch I had in my bag which resolved the issues.

Without digging into the SQL itself could this be caused by running SQL over a wireless connection as opposed to a cabled connection or is this a case of "I just want this to be a SQL problem?"

tkizer
Almighty SQL Goddess

USA
37460 Posts

Posted - 04/04/2006 :  15:20:08  Show Profile  Visit tkizer's Homepage
Is there a clustered index on the column that has the numeric values? If not, did you use an ORDER BY? If no to both of these, then there is no way to guarantee order. SQL Server will return the data as it finds it.

So this is not a network issue.

Tara Kizer
aka tduggan
Go to Top of Page

fwdtech
Starting Member

11 Posts

Posted - 04/04/2006 :  15:29:44  Show Profile
quote:
Originally posted by tkizer

Is there a clustered index on the column that has the numeric values? If not, did you use an ORDER BY? If no to both of these, then there is no way to guarantee order. SQL Server will return the data as it finds it.



The stored procedure has an ORDER BY at the end thats how I got back the other 18 sets in numerical order. I'm going to try this again at the office and see if I can duplicate what happened.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37460 Posts

Posted - 04/04/2006 :  15:47:02  Show Profile  Visit tkizer's Homepage
So did you execute the stored procedure, open the table in Enterprise Manager, or use a select statement in Query Analyzer?

Tara Kizer
aka tduggan
Go to Top of Page

fwdtech
Starting Member

11 Posts

Posted - 04/04/2006 :  15:48:38  Show Profile
quote:
Originally posted by tkizer

So did you execute the stored procedure, open the table in Enterprise Manager, or use a select statement in Query Analyzer?



I executed the procedure from within a command line app in c#. It was the same chunk of code that we were using from our control application. 18 of 20 dumps of data looked fine but 2 had this out-of-order issue.
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 04/04/2006 :  17:57:05  Show Profile
can you try to execute your Stored Procedure in Query Analyser over a wireless connection and compare it with over a wired connection ?



KH


Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000