RE: System.OutOfMemory Exception
From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 01/21/05
- Next message: LP: "Re: System.OutOfMemory Exception"
- Previous message: Chris, Master of All Things Insignificant: "Re: System.OutOfMemory Exception"
- In reply to: LP: "System.OutOfMemory Exception"
- Next in thread: Jeremy Chapman: "Re: System.OutOfMemory Exception"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 Jan 2005 12:35:06 -0800
Consider creating a view in SQL Server that gets the data in the correct
format and use a Process object to fire BCP to pull from this view. You will
have to assemble a proper BCP line, but the advantages are as follows:
1. Reduced load on SQL Server
2. No memory overhead issues
3. Much faster than anything you can write in VB.NET
If you are comfortable with running a batch script, you can simply put the
BCP line in a .bat file and run it. Less control, less overhead.
The problem with your application is most likely the 2 GB virtual memory
allocation per application in Windows. You can registry tweak this, but
realize that it could have adverse effects on programs other than yours. BCP
is a better option on a variety of fronts and quite easy to set up from the
command line (using SQL Server books online).
--- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "LP" wrote: > Hello, > > We running VB.NET application which gets massive amounts of data from SQL > Server, loads data into DataTables, then re-arranges data into tabular > structure and outputs it to a flat file. This is just the nature of > requirements for this application. Business analyst here want certain data > to be "re-horizontalize" and served in a single flat file. > We ran this app many times before on data from different quarters, that > worked without any problems. However, now they want to run this program > against data for the whole last year. We keep getting System.OutOfMemory > Exception. I realize that it's a huge amount of data that has to be > processed in a dataset..., but is there any quick fixes for this kind of > error, system tweaks (besides more memory). We really don't have time to > redesign this application to handle data any differently at this time. They > need this file yesterday!!! Please help. > > By the way; the machine that it's running on has 2gb of RAM, > > >
- Next message: LP: "Re: System.OutOfMemory Exception"
- Previous message: Chris, Master of All Things Insignificant: "Re: System.OutOfMemory Exception"
- In reply to: LP: "System.OutOfMemory Exception"
- Next in thread: Jeremy Chapman: "Re: System.OutOfMemory Exception"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|