473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SQL 2000: Transport-level error on SELECT statement

I am facing a wierd problem with SQL Server standard edition SP2.

I have a statement like
SELECT A,B,C, ....,
dbo.TEST_GETATTENDEEDETAILS(CI.SI_ID) AS SI_ATTENDEENAME,
X,Y,Z
from .....

The function emits a CSV string. When I run the above command, I get
an error that says:

A transport-level error has occurred when receiving results from the
server. (provider: Shared Memory Provider, error: 0 - The system
cannot open the file.)

The client loses contact with the DB server. From the logs I can see
that SQL server gets autostared.
If I comment out the function call, the statement runs fine. If I
uncomment the function call then, it works fine and gives the expected
result.

What could be the reason?

Thanks,
Yash
Aug 13 '08 #1
9 2127
Most probably you have some bug or issue inside that function. You need to talk to whoever provided
that function so that they can rectify this bug.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Yashgt" <ya****@gmail.comwrote in message
news:de**********************************@n38g2000 prl.googlegroups.com...
>I am facing a wierd problem with SQL Server standard edition SP2.

I have a statement like
SELECT A,B,C, ....,
dbo.TEST_GETATTENDEEDETAILS(CI.SI_ID) AS SI_ATTENDEENAME,
X,Y,Z
from .....

The function emits a CSV string. When I run the above command, I get
an error that says:

A transport-level error has occurred when receiving results from the
server. (provider: Shared Memory Provider, error: 0 - The system
cannot open the file.)

The client loses contact with the DB server. From the logs I can see
that SQL server gets autostared.
If I comment out the function call, the statement runs fine. If I
uncomment the function call then, it works fine and gives the expected
result.

What could be the reason?

Thanks,
Yash

Aug 13 '08 #2
Yashgt (ya****@gmail.com) writes:
I am facing a wierd problem with SQL Server standard edition SP2.

I have a statement like
SELECT A,B,C, ....,
dbo.TEST_GETATTENDEEDETAILS(CI.SI_ID) AS SI_ATTENDEENAME,
X,Y,Z
from .....

The function emits a CSV string. When I run the above command, I get
an error that says:

A transport-level error has occurred when receiving results from the
server. (provider: Shared Memory Provider, error: 0 - The system
cannot open the file.)

The client loses contact with the DB server. From the logs I can see
that SQL server gets autostared.
If I comment out the function call, the statement runs fine. If I
uncomment the function call then, it works fine and gives the expected
result.
Examine the SQL Server log for crash dumps. The most likely reason is
that the function provokes a bug in SQL Server.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Aug 13 '08 #3
>The function emits a CSV string. <<

Since you are not going to follow even First Normal Form, why use SQL
at all? Columns are suppose to be scalar values and not list
structures. Get rid of the non-1NF code and write SQL instead of a
weird dialect.
Aug 13 '08 #4
--CELKO-- (jc*******@earthlink.net) writes:
>>The function emits a CSV string. <<

Since you are not going to follow even First Normal Form, why use SQL
at all? Columns are suppose to be scalar values and not list
structures. Get rid of the non-1NF code and write SQL instead of a
weird dialect.
Yeah Joe, tell the people who want a comma-separated list on their
reports that they are violating first normal form. They will probably
tell you it is the most normal form of presentation they can think of...

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 14 '08 #5

The ERRORLOG only has messages of the server starting up. There is no
messgae of the crash.

Here is the code of the function:
REATE FUNCTION TEST_GETATTENDEEDETAILS ( @CLAIMITEMID INT )
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @RETURNSTRING VARCHAR(8000)
SET @RETURNSTRING = ''

IF @CLAIMITEMID IS NOT NULL
BEGIN
SELECT @RETURNSTRING =
@RETURNSTRING + ',' +
isnull(SI_NAME,'') +',' + isnull(SI_JOBTITLE,'') +',' +
isnull(SI_NOTES,'')
FROM SI_ATTENDEE (NOLOCK)
WHERE SI_CLAIMITEMID = @CLAIMITEMID -- This lookup is an index seek
END

RETURN @RETURNSTRING

END
GO

I know for sure that the CSV will never exceed 8000 characters. We are
creating a CSV because that is the way it will be shown in a report.

Thanks,
Yash

Erland Sommarskog wrote:
--CELKO-- (jc*******@earthlink.net) writes:
>The function emits a CSV string. <<
Since you are not going to follow even First Normal Form, why use SQL
at all? Columns are suppose to be scalar values and not list
structures. Get rid of the non-1NF code and write SQL instead of a
weird dialect.

Yeah Joe, tell the people who want a comma-separated list on their
reports that they are violating first normal form. They will probably
tell you it is the most normal form of presentation they can think of...

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 14 '08 #6
Yashgt (ya****@gmail.com) writes:
The ERRORLOG only has messages of the server starting up. There is no
messgae of the crash.
Strange. That would indicate that something goes wrong in SQL Client.
What happens if you run the statement from SQLCMD or OSQL?

And since the error talks about shared memory, what happens when
you connect from a different machine
Here is the code of the function:
REATE FUNCTION TEST_GETATTENDEEDETAILS ( @CLAIMITEMID INT )
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @RETURNSTRING VARCHAR(8000)
SET @RETURNSTRING = ''

IF @CLAIMITEMID IS NOT NULL
BEGIN
SELECT @RETURNSTRING =
@RETURNSTRING + ',' +
isnull(SI_NAME,'') +',' + isnull(SI_JOBTITLE,'') +',' +
isnull(SI_NOTES,'')
FROM SI_ATTENDEE (NOLOCK)
WHERE SI_CLAIMITEMID = @CLAIMITEMID -- This lookup is an index seek
END

RETURN @RETURNSTRING
Beware that this function relies on undefined behaviour, and the result
from the function (when it works) may not be what you expect it to be.
See http://support.microsoft.com/default.aspx?scid=287515. Note
particular the first sentence under CAUSE.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Aug 14 '08 #7
Erland Sommarskog wrote:
--CELKO-- (jc*******@earthlink.net) writes:
>>>The function emits a CSV string. <<
Since you are not going to follow even First Normal Form, why use SQL
at all? Columns are suppose to be scalar values and not list
structures. Get rid of the non-1NF code and write SQL instead of a
weird dialect.

Yeah Joe, tell the people who want a comma-separated list on their
reports that they are violating first normal form. They will probably
tell you it is the most normal form of presentation they can think of...
The proper answer is "let the reporting layer combine multiple values
into a comma-separated list".
Aug 17 '08 #8
Everything works fine after installing SP4.
Aug 20 '08 #9
Yash (ya****@gmail.com) writes:
Everything works fine after installing SP4.
Great to hear that it worked out. Thanks for reporting back!

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 20 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Serdar Yegulalp | last post by:
I'm in the process of migrating a lot of data (millions of rows, 4GB+ of data) from an older SQL Server 7.0 database to a new SQL Server 2000 machine. Time is not of the essence; my main concern...
2
by: deba | last post by:
From the documentation of SOAP it seems SOAP supports both HTTP and TCP protocol.I did not find much documentation how to use TCP as transport layer in SOAP? Does the SOAP toolkit 2.0 supports...
2
by: jimmy | last post by:
Hi, I have a main loop like this: while (true) { receive(); update(); draw(); }
1
by: Jeff | last post by:
Does anyone know of a python module to read a SAS Transport (XPORT) file?
1
by: Muscha | last post by:
Hello, Every now and then my application throw this exception: "Unable to read data from the transport connection" And when I break into the Visual Studio, the thread where it failed has...
0
by: Aryeh Holzer | last post by:
Hi, I've been trying to use the weather webservice available from the National Weather Service (NWS), at http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML. wsdl without success. Here's...
2
by: Navin Mishra | last post by:
Hi, Can ASP.NET web service account be modified to use TCP transport ? Or is there any example of a .NET web service offering TCP transport ? Thanks in advance and regards Navin
1
by: google | last post by:
I have created a simple HelloWorld application in WSE2.0 SP3. When I browse to the endpoint url over http (e.g. http://localhost/TestService.ashx) the WSDL is fine and I can create a client...
1
by: Tobias Grimm | last post by:
Hi! I'm trying to get a WebService running (self hosting, without IIS) that uses SSL and loads the SSL key/certificate from a file (without using httpcfg.exe). I have a running service and...
0
by: =?Utf-8?B?TWlraGFpbCBNYWtzaW1lbmtv?= | last post by:
I've heard that WCF net.tcp transport security is provided by Windows TLS. At the same time, I've read that internally it relies on PKI (Public Key Infrastructure), and requires some kind of CA...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.