Discussion:
[freetds] Huge result files from bsqlodbc
Jochen Daum
2012-11-21 09:33:54 UTC
Permalink
Hi,

When I run a query through bsqlodbc/FreeTDS against a single text
column, I'm getting huge result files.

The command I use is: bsqlodbc -U sa -P **** -S EIS -D
ExportInformationSystem -i attachment.sql -o odbcfile.pdf -e odbcerror

attachment.sql:
select [Attachment].[attaId], [Attachment].[attaFilename],
CAST([Attachment].[attaContent] as varchar(max)) as [attaContent]
FROM [Attachment]
WHERE ([Attachment].[attaId] = 2910)
ORDER BY [Attachment].[attaId]

The text column contains 160832 bytes.

I tried changing "text size" in /etc/freetds/freetds.conf, but it does
not seem to have any effect.

I'm concerned that the query doesn't return anything through PHP on my
web server is that it is running out of memory?





Kind Regards,

Jochen Daum
Jochen Daum
2012-11-21 09:35:08 UTC
Permalink
In addition: the content of odbcfile.pdf is correct as far as I can
see from less.

Jochen
Post by Jochen Daum
Hi,
When I run a query through bsqlodbc/FreeTDS against a single text
column, I'm getting huge result files.
The command I use is: bsqlodbc -U sa -P **** -S EIS -D
ExportInformationSystem -i attachment.sql -o odbcfile.pdf -e odbcerror
select [Attachment].[attaId], [Attachment].[attaFilename],
CAST([Attachment].[attaContent] as varchar(max)) as [attaContent]
FROM [Attachment]
WHERE ([Attachment].[attaId] = 2910)
ORDER BY [Attachment].[attaId]
The text column contains 160832 bytes.
I tried changing "text size" in /etc/freetds/freetds.conf, but it does
not seem to have any effect.
I'm concerned that the query doesn't return anything through PHP on my
web server is that it is running out of memory?
Kind Regards,
Jochen Daum
--
P.S.: Latest newsletter: Website application reporting - an overview -
http://eepurl.com/pKrAD

Kind Regards,

Jochen Daum

"There is no shortcut to anywhere worth going" - Beverly Sills

Automatem Ltd
Phone: +64 9 630 3425
Mobile: +64 21 567 853
Email: jd at automatem.co.nz
Website: www.automatem.co.nz
Skype: jochendaum
http://nz.linkedin.com/in/automatem
http://twitter.com/automatem
Loading...