Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in stored procedure
Message
 
 
To
16/02/2012 04:50:16
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01535532
Message ID:
01535543
Views:
35
>Hi
>
>I have a stored procedure I am running in management studio.
>
>The stored procedure loops through a table and inserts items into some other tables.
>
>I've wrapped each loop in a transaction and commit the transaction at the end of the loop.
>
>after the stored procedure has been running through a couple of thousand records
>
>I get this error
>
>An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.
>
>the stored procedure carries on.
>
>Any ideas what this error is about.
>
>Thanks

Do you really need loop processing? How big is your original table? Can you do all inserts as one set? Do you have SET NOCOUNT ON ; at the top of SP? Do you output some data back during procedure's life?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform