Tuesday, March 20, 2012

Problem executing a stored proc, please help

Hi All,
I have stored proc that processes about 60,000 rows using a cursor. When I
call the SP from Query Analyzer, I get the following error message after
processing about 12,000 records :
Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
12614 records
What can i do to make this SP run sucessfully ? I even tried using a table
variable instead of a cursor, but got the same result. Please suggest .
THE output from SP_CONFIG on database server is
Option
config_value
------
affinity mask 0
allow updates 0
awe enabled 0
c2 audit mode 0
cost threshold for parallelism 5
Cross DB Ownership Chaining 0
cursor threshold -1
default full-text language 1033
default language 0
fill factor (%) 0
index create memory (KB) 0
lightweight pooling 0
locks 0
max degree of parallelism 0
max server memory (MB) 2147483647
max text repl size (B) 65536
max worker threads 255
media retention 0
min memory per query (KB) 1024
min server memory (MB) 0
nested triggers 1
network packet size (B) 4096
open objects 0
priority boost 0
query governor cost limit 0
query wait (s) -1
recovery interval (min) 0
remote access 1
remote login timeout (s) 20
remote proc trans 0
remote query timeout (s) 0
scan for startup procs 0
set working set size 0
show advanced options 1
two digit year cutoff 2049
user connections 0
user options 0Hi
It would help if you posted DDL and example data such as
http://www.aspfaq.com/etiquett­­e.asp?id=5006 and
example data as insert statements
http://vyaskn.tripod.com/code.­­htm#inserts
Connection broken implies a network failure/disconnection, possibly a
timeout but you do not indicate how long this process takes.
Check your SQL server version and service pack level, you may also want to
check MDAC version and consistancy along with the SQL Server log and event
log to see if there is any more information that may help.
Other posts on this http://tinyurl.com/4ebus may be helpful.
John
"rajeshlh" <rajeshlh@.discussions.microsoft.com> wrote in message
news:F1F399D6-BB17-4FC9-BF10-4F7D3A31F7B1@.microsoft.com...
> Hi All,
> I have stored proc that processes about 60,000 rows using a cursor. When I
> call the SP from Query Analyzer, I get the following error message after
> processing about 12,000 records :
>
> Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead
> (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
>
> Connection Broken
>
>
> 12614 records
>
> What can i do to make this SP run sucessfully ? I even tried using a table
> variable instead of a cursor, but got the same result. Please suggest .
>
> THE output from SP_CONFIG on database server is
> Option
> config_value
> ------
> affinity mask 0
> allow updates 0
> awe enabled 0
> c2 audit mode 0
> cost threshold for parallelism 5
> Cross DB Ownership Chaining 0
> cursor threshold -1
> default full-text language 1033
> default language 0
> fill factor (%) 0
> index create memory (KB) 0
> lightweight pooling 0
> locks 0
> max degree of parallelism 0
> max server memory (MB) 2147483647
> max text repl size (B) 65536
> max worker threads 255
> media retention 0
> min memory per query (KB) 1024
> min server memory (MB) 0
> nested triggers 1
> network packet size (B) 4096
> open objects 0
> priority boost 0
> query governor cost limit 0
> query wait (s) -1
> recovery interval (min) 0
> remote access 1
> remote login timeout (s) 20
> remote proc trans 0
> remote query timeout (s) 0
> scan for startup procs 0
> set working set size 0
> show advanced options 1
> two digit year cutoff 2049
> user connections 0
> user options 0
>
>
>

No comments:

Post a Comment