Can someone Figure Out this Error….! | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Can someone Figure Out this Error….!

Hi Gurus, Help me figure out this error.I would like to know what is the problem
with my SP, That I got this error. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation. Connection Broken
Thanks raj
COnfirm the service pack level on SQL, when and whre you’re getting this error.
ENsure the client and server are using similar network protocol. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Well,let me explain. I executed a Stored Procedure.This SP has a Select Query fetching data from multiple tables.
Using an Insert Select I am inserting the Data into another Report table. The Select Query has an Outer Join and due some missing data.The Query was going into
cartesian product, And due to that I was getting the Above error. I fixed the Query by adding IS NOT NULL and the SP Worked. I Guess there is no problem with the network protocol.Apart from this the other SPs
worked fine. Thanks raj
raj, An OUTER JOIN with any criteria for the "outer table" will be the same as an INNER JOIN, only SQL usually performs better if you specify INNER JOIN.
Actually the optimizer is likely to create an identical execution plan when you reference a column in the unpreserved table which will turn the LEFT JOIN into an INNER JOIN. Consider this:
CREATE TABLE #Table1
(tid INT, c1 CHAR) CREATE TABLE #Table2
(tid INT, c2 CHAR) INSERT INTO #Table1
SELECT 1, ‘a’
UNION ALL
SELECT 2, ‘b’
UNION ALL
SELECT 3, ‘c’
UNION ALL
SELECT 4, ‘d’ INSERT INTO #Table2
SELECT 1, ‘x’
UNION ALL
SELECT 2, ‘y’
UNION ALL
SELECT 3, ‘z’ SELECT t1.*, t2.c2
FROM #Table1 t1
LEFT OUTER JOIN #Table2 t2
ON t1.tid=t2.tid
WHERE t2.c2=’x’ SELECT t1.*, t2.c2
FROM #Table1 t1
INNER JOIN #Table2 t2
ON t1.tid=t2.tid
WHERE t2.c2=’x’ DROP TABLE #Table1, #Table2 —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)

]]>