Hey,

I'm currently setting up OTRS 2.2 on a Linux server with a MS SQL 2005
storage backend. Please don't suggest that I use some other combination;
the decision was not mine, and I would certainly have chosen
differently.

However, what I would like to do is to share some of the workarounds
that I'll have to develop over the next couple of days. I will always
try to check against CVS HEAD before posting.

The first item on my list:

MS SQL 2005 (don't know about earlier versions) don't support the LIKE()
function on TEXT columns. This is a problem e.g. for the ticket search
if you're looking for something in the email body. The resulting query
is something like

... AND LOWER(article.a_body) LIKE LOWER('%my_search_term%")...

which the MS SQL server answers with an error.

My workaround is to modify Kernel/System/Ticket.pm the 'Body' key of the
'FieldSQLMapFullText' hash around line 3557 and add a CAST:

...
  Body => 'CAST(at.a_body AS VARCHAR(MAX))',

I've also looked through the other files beneath Kernel. None seems to
use something like LOWER() etc on TEXT columns (there are only eight or
nine TEXT columns in otrs-schema.mssql.sql). I have NOT checked any
other add-on module like the FAQ or the ITIL modules. However, as our
project involves ITIL I will install and check them later.

I'm perfectly aware that this fix is a database specific fix in a
general purpose file and therefore not appropriate for inclusion
as-is. My goal is just to point out some problems. Maybe the developers
can keep these things in mind and fix the issues in future releases.

Regards,
Moritz

-- 
Dipl.-Inform. Moritz Bunkus
Geschäftsführung

LINET Services GbR  |  Gotenweg 15  |  38106 Braunschweig
Tel. 0531-180508-0  |  Fax 0531-180508-29

http://www.linet-services.de

Vertretungsberechtigte Gesellschafter:
Moritz Bunkus, Philip Reetz und Timo Springmann

USt-IdNr. DE 206946144

Attachment: pgp33zUGGNcLA.pgp
Description: PGP signature

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to