开发者

Exception 'System.OutOfMemoryException'

开发者 https://www.devze.com 2022-12-17 05:18 出处:网络
When I try to generate script to a table that contain 500000 records I\'m getting an error: Exception of type \'System.OutOfMemoryException\' 开发者_如何转开发was thrown. Can anybody suggest a solutio

When I try to generate script to a table that contain 500000 records I'm getting an error: Exception of type 'System.OutOfMemoryException' 开发者_如何转开发was thrown. Can anybody suggest a solution for backup the table data to clear this error.


Realistically generating a script with 500,000 inserts is not going to be particularly efficient (assuming you don't run out of RAM of course!). If you need to back up the data I'd look at either backing up the database file itself from the filesystem or alternatively use something like SSIS to export to a file. Both should work just fine.


Based on your description, it seems that there are no sufficient memory, and I notice that you are using 32-bit Windows Vista, a 32-bit machine can directly address only 4 GB of memory, and by default, Windows itself reserves the top 2 GB of address space for its own use, which leaves only 2 GB as the maximum size of the VAS (virtual address space) for any application.

However, we could enable 3GB switch to allow application have a VAS of up to 3GB, here is the steps applies to Windows Vista:

Right-click Command Prompt in the Accessories program group of the Start menu. Click Run as Administrator. At the command prompt, enter "bcdedit /set IncreaseUserVa 3072" Restart the computer.

Also please refer this thread: http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f3736f72-7953-4578-b294-044bb63cd483

0

精彩评论

暂无评论...
验证码 换一张
取 消