Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SProc executing twice - or getting Msg 233, Level 20 transport-level error has occurred

$
0
0

I am connected the local SQL Server. In a Query Window I try the following.  At first It was executing the sproce twice. I closed the query window (several times) and reopened a new one. Stripped out almost all the code and still twice. Executed in Debugger and still twice.

Trying to figure out what is up, stripped out even more code and now get a Msg 233, Level 20, State 0, Line 0 A transport-level error has occurred.

Anybody know what is up? I can live with the transport error because I am calling a raiseerror. But the executing twice has to be resolved.

CREATE PROCEDURE [dbo].[ifs_PPCreateDBTemplates]
@pH360User VARCHAR(50)
AS
BEGIN
SET NOCOUNT ON 
DECLARE @Note VARCHAR(500)
DECLARE @BatchID VARCHAR(50)
print 'start of proc'
EXECUTE usp_GenerateBatchID @BatchID OUTPUT
UPDATE ifs_PPCurrentRun SET batchid = @batchid 
DECLARE @Compatibility_Level Int
SELECT @Compatibility_Level = compatibility_level FROM sys.databases  WHERE name = DB_NAME()
RAISERROR (@Note, 20, 127) WITH LOG
print 'after raiseerror'	
END
GO

Got this returned in the msg window...

start of proc
Msg 2745, Level 16, State 2, Procedure ifs_PPCreateDBTemplates, Line 19
Process ID 119 has raised user error 50000, severity 20. SQL Server is terminating this process.

start of proc
Msg 2745, Level 16, State 2, Procedure ifs_PPCreateDBTemplates, Line 19
Process ID 119 has raised user error 50000, severity 20. SQL Server is terminating this process.
Msg 50000, Level 20, State 127, Procedure ifs_PPCreateDBTemplates, Line 19
 
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

Then stripped out some more code to see what happened ... And got a tranport-level error

CREATE PROCEDURE [dbo].[ifs_PPCreateDBTemplates]
@pH360User VARCHAR(50)
AS
BEGIN
SET NOCOUNT ON 
DECLARE @Note VARCHAR(500) 
SET @Note = 'RaiseError'
print 'start of proc'
RAISERROR (@Note, 20, 127) WITH LOG
print 'after raiseerror'	
END
GO

Got this returned in the msg window...

Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>