ksublondie has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks!
I've got an apache server using FreeTDS, DBI & DBD::Sybase to connect to a sql2008 db. I would like to implement sql2008's Filestream functionality, but I've hit a wall.
Yes, I'm actually printing the content to a physical printer, but I need to store a "snapshot" of the print job for auditing purposes since the information is sensitive. If I set $print to a simple test string (i.e. 'testing'), it works like a charm and I can see the text files on the sql server. However, when I try to set $print to my postscript content, I get the following error in the apache log:sub printTransaction{ ... #$print is postscript content generated with Postscript::Simple my $statement ="insert into Printed (thisid,[datetime],id,printedby,da +ta) values ('$thisid','$now','$id','$userid',cast('$print' as varbinary(MA +X)))"; eval{ $db->do($statement); }; if ($@){ warn "Aborted because $@"; $db->rollback; return 0; } ... }
...and then after restarting apache, I see:[Mon Feb 28 17:54:25 2011] -e: DBD::Sybase::db do failed: Server messa +ge number=8179 severity=16 state=2 line=1 server=SQL2008\SQL2008 proc +edure=sp_unprepare text=Could not find prepared statement with handle + 0. [Mon Feb 28 17:54:25 2011] -e: Aborted because DBD::Sybase::db do fail +ed: Server message number=8179 severity=16 state=2 line=1 server=SQL2 +008\SQL2008 procedure=sp_unprepare text=Could not find prepared state +ment with handle 0.
...Which I only see after running my script with ps content and restarting apache. No other time.[Tue Mar 01 10:39:20 2011] [notice] Graceful restart requested, doing +restart out of memory for rpc row!
I haven't been able to find much help from google, but I'm suspecting that the FreeTDS connection is getting overloaded by the volume of the content I'm trying to pass (???), however, sql2008 Filestream is designed for files larger than 1M. Anything smaller is defeating the purpose. Is it even possible to implement Filestream with perl scripts?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: sql2008 Filestream
by Eliya (Vicar) on Mar 01, 2011 at 18:21 UTC | |
by ksublondie (Friar) on Mar 01, 2011 at 19:48 UTC | |
by Eliya (Vicar) on Mar 01, 2011 at 20:07 UTC | |
by ksublondie (Friar) on Mar 02, 2011 at 00:32 UTC | |
by Eliya (Vicar) on Mar 02, 2011 at 02:45 UTC | |
|
Back to
Seekers of Perl Wisdom