SQL job failed (General network error)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: LBT (LBT_at_discussions.microsoft.com)
Date: 01/05/05


Date: Tue, 4 Jan 2005 19:59:03 -0800

Good day SQL experts and seniors,

I have a SQL job which is scheduled to run everytime when SQL agent starts.
The job will invoke a stored procedure. This stored procedure will run
continuously using "While Loop" by referring to a flag stored inside a SQL
table. If the flag is set to "OFF", the stored procedure will stop.

Problem arises when CPU usage is high whereby the job will be terminated
unexpectedly with an error message "Executed as user: KMS_NT_P1\SysAdmin.
ConnectionRead (recv()). [SQLSTATE 01000] (Message 10054) General network
error. Check your network documentation. [SQLSTATE 08S01] (Error 11). The
step failed". The MSSQL is already installed with service pack 3 and in
normal condition the job can continue executing for days.

What is the root cause of this issue? Inside my code, there is no any SQL
statement which is called across database server (only got statement to grab
record from other database resided in the same server). Anything I can do to
avoid this error from occuring?

Below are the stored procedure called by my SQL job:
---------------------------------------------------------------------------------------------
CREATE Procedure Proc_RE_On_Off_Process
As

declare @execution_status varchar(5)
declare @delay_time varchar(10)

select @execution_status = RE_On_Off_Flag from SPC_RE_On_Off_Process

if @execution_status <> 'ON'
begin
        insert into SPC_RE_On_Off_Log
        values (getdate(), 'RE process is not started')
end
else
begin
        insert into SPC_RE_On_Off_Log
        values (getdate(), 'RE process is started')
end

while @execution_status = 'ON'
begin
        exec Proc_Run_RE_Jobs
        
        if @@Error <> 0
        begin
                insert into SPC_RE_On_Off_Log
                values (getdate(), 'Process stopped due to error: ' + cast(@@Error as
varchar(20)))
                break
        end
        else
        begin
                select @execution_status = RE_On_Off_Flag, @delay_time = RE_Delay_Time
from SPC_RE_On_Off_Process
                if @execution_status <> 'ON'
                begin
                        insert into SPC_RE_On_Off_Log
                        values (getdate(), 'RE process is terminated')
                        break
                end
                else
                begin
                        waitfor delay @delay_time
                end
        end
end
-----------------------------------------------------------------------------------------------

Any idea would be greatly appreciated. Thanks



Relevant Pages

  • Re: Poor performance when executing stored procedure
    ... If SQL Server ... has to re-compile the SP, it takes shorter time to compile a smaller stored ... Poor performance when executing stored procedure ...
    (microsoft.public.sqlserver.programming)
  • Re: Views vs Stored Procedures, whats the difference?
    ... I hope you are not suggesting you embed SQL queries into the application? ... A stored procedure logic will be exactly as fast as the algorithm you ... I understant that SQL Server supports hints. ... implementations (nestedloop, merge, hash, ..) on decent sized tables, then ...
    (comp.databases.ms-sqlserver)
  • Re: Stored Procedures - Patterns and Practices
    ... >published the reasoning behind its opinions. ... I disagree that the debate in SQL Server related discussion forums ... If the natural key is long or spans too many ... I want to call a stored procedure that adds a customer ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL/ASP - Timout Problem w/ Particular Statement
    ... inside the stored proc and i was executing one query or the other based ... > My asp page calls a stored procedure passing many parameters. ... > I used the SQL profiler to get the exact stored procedure with all ... > After executing 2-3 times the stored procedure in the Query Analyzer, ...
    (comp.databases.ms-sqlserver)
  • Re: Issue with retrieving large data over web using Stored Procedu
    ... how do I go about analyzing a stored procedure with selecting ... Is there any tool in the SQL Profiler that analyze each Trace? ... "Active Server Pages error 'ASP 0113' ... This email account is my spam trap ...
    (microsoft.public.inetserver.asp.db)