Trying to get a large amount of data (column type is "text") from an MS SQL Server
2
votes
1
answer
2831
views
I want to get like 300MB of data (
text
column) out of an MS SQL Server, but with the library I'm using I'm getting an out-of-memory exception as soon as I try to access the field. Unfortunately, I'm bound to that library and cannot switch to something else.
I've tried getting chunks using SUBSTRING()
, but that returns varchar
and the max len is 8000, so getting 300MB in chunks of 8K would take forever.
Is there any other way to do this? If I could get that 300MB in 3x 100MB chunks that would be fine, 100MB don't seem to throw an exception. Maybe to somehow split the data server-side?
MS SQL Server Version is 14.0.3436.1
Thanks in advance
Asked by BETSCH
(23 rep)
Apr 28, 2022, 10:06 AM
Last activity: Apr 28, 2022, 11:24 AM
Last activity: Apr 28, 2022, 11:24 AM