Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Programming / SQL / December 2008

Tip: Looking for answers? Try searching our database.

A severe error occurred on the current command.  The results, if a

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gokhan Akcam - 30 Dec 2008 15:25 GMT
We are using SQL Server 2000. We have linked servers. We wrote a SP
containing only a print statement on the remote server. When we try to
execute SP by calling remote procedure we get the following error msgs. SQL
Server 2000 SP4

"A severe error occurred on the current command.  The results, if any,
should be discarded."

It is almost impossible for us to remove all print statements all over the
database objects (there are tons of triggers and SP s  containing print
statement)

Could anyone help us?
Uri Dimant - 30 Dec 2008 15:39 GMT
Sorry fo asking but what is the purpose to have only PRINT statement in the
SP?

> We are using SQL Server 2000. We have linked servers. We wrote a SP
> containing only a print statement on the remote server. When we try to
[quoted text clipped - 10 lines]
>
> Could anyone help us?
Gokhan Akcam - 30 Dec 2008 15:46 GMT
Dear Uri,
Suppose that I can't go ahead without print statement. It should be there.
What'is your solution?

> Sorry fo asking but what is the purpose to have only PRINT statement in the
> SP?
[quoted text clipped - 13 lines]
> >
> > Could anyone help us?
Uri Dimant - 31 Dec 2008 09:16 GMT
Hi
I do not get any erors
CREATE PROCEDURE [dbo].[s] AS
PRINT 'YES'
GO

EXEC [ServerName].master.dbo.s

'YES'

> Dear Uri,
> Suppose that I can't go ahead without print statement. It should be there.
[quoted text clipped - 19 lines]
>> >
>> > Could anyone help us?
Gokhan Akcam - 30 Dec 2008 15:52 GMT
Generally print statements are used for debug purposes. Even if we remove all
print statements we will need it later when we will need to debug the sp.

If we ignore the purpose we use the print statement, I guess there's a bug
in SQL Server 2000. Am I right?

> Sorry fo asking but what is the purpose to have only PRINT statement in the
> SP?
[quoted text clipped - 13 lines]
> >
> > Could anyone help us?
Erland Sommarskog - 30 Dec 2008 23:44 GMT
> Generally print statements are used for debug purposes. Even if we
> remove all print statements we will need it later when we will need to
> debug the sp.
>
> If we ignore the purpose we use the print statement, I guess there's a bug
> in SQL Server 2000. Am I right?

That message is an indication of that there is a bug somewhere. The
message itself comes from SqlClient, the client API that SQL Server
Management Studio uses.

It doesn't seem to matter where the remote procedure is located. I get
the error both when the procedure is on SQL 2000 and on SQL 2005.

But I only get the error if I call the remote procedure from SQL 2000.

And only if I connect with Mangement Studio. That is, I get no error when
I connect with Query Analyser (ODBC), SQLCMD (OLE DB) or ISQL (DB-Library).

If your real application is a .Net application, you have a problem. If your
application does not use SqlClient you can sleep over.

Signature

Erland Sommarskog, SQL Server MVP, esquel@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/prodinfo/previousversions/books.mspx

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.