[SOLVED] DBI:Sybase problem

Moderator: crythias

Post Reply
zhakal
Znuny newbie
Posts: 47
Joined: 30 Jul 2011, 20:06
Znuny Version: 3.0.11

[SOLVED] DBI:Sybase problem

Post by zhakal »

Hi,

I've made another server but from scratch using OTRS 3.0.10 on Centos 6 x64 which connects to a W2008/SQL2008
When running otrs.CheckDB.pl i get the following.

[root@localhost]# perl /opt/otrs/bin/otrs.CheckDB.pl
Setting of CS_OPT_TEXTSIZE failed. at /usr/local/lib64/perl5/DBI.pm line 720.
Trying to connect to database
DSN: DBI:Sybase:server=MSSQL;port=1433;database=OTRS;username=test;password=test;
DatabaseUser: test

It looks Ok!

But when accessing the page through index.pl i get the following (Apache error log)

[Fri Sep 2 21:28:01 2011] -e: DBI connect('server=MSSQL;port=1433;database=OTRS;username=test;password=test;','test',...) failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (41)
[Fri Sep 2 21:28:01 2011] -e: Server MSSQL, database
[Fri Sep 2 21:28:01 2011] -e: Message String: Unable to connect: Adaptive Server is unavailable or does not exist
[Fri Sep 2 21:28:01 2011] -e: at /opt/otrs//Kernel/System/DB.pm line 210
ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Fri Sep 2 21:28:01 2011

Message: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (41)
Server MSSQL, database
Message String: Unable to connect: Adaptive Server is unavailable or does not exist

Traceback (30995):
Module: Kernel::System::DB::new (v1.127.2.2) Line: 181
Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 140
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46
Module: (eval) (v1.89.2.1) Line: 204
Module: ModPerl::RegistryCooker::run (v1.89.2.1) Line: 204
Module: ModPerl::RegistryCooker::default_handler (v1.89.2.1) Line: 170
Module: ModPerl::Registry::handler (v1.99) Line: 31

Config.pm

$Self->{'DatabaseHost'} = 'MSSQL';
$Self->{DatabasePort} = '1433';

$Self->{'Database'} = 'OTRS';
$Self->{'DatabaseUser'} = 'test';
$Self->{'DatabasePw'} = 'test';


$Self->{DatabaseDSN} = "DBI:Sybase:"
. "server=$Self->{DatabaseHost};"
. "port=$Self->{DatabasePort};"
. "database=$Self->{Database};"
. "username=$Self->{DatabaseUser};"
. "password=$Self->{DatabasePw};";

I've even tried running tsql up against the server without problem. (TSQL -C)
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: yes
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.0
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes

The only thing i can see being a issue here is the
[Fri Sep 2 21:28:01 2011] -e: at /opt/otrs//Kernel/System/DB.pm line 210
Setting of CS_OPT_TEXTSIZE failed. at /usr/local/lib64/perl5/DBI.pm line 720.

but still can't figure out what to do to fix it. I've tried everything i can think of :/
Hopefully somebody knows how to fix this.
Last edited by zhakal on 03 Sep 2011, 19:41, edited 1 time in total.
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: DBI:Sybase problem

Post by jojo »

you need to tell OTRS in the config that this is an mssql server also.

But: Using MS SQL Databases from *NIX is not supported!
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
zhakal
Znuny newbie
Posts: 47
Joined: 30 Jul 2011, 20:06
Znuny Version: 3.0.11

Re: DBI:Sybase problem

Post by zhakal »

I've added as mentioned the following in the Config.pm

$Self->{"Database::Type"} = 'mssql';

But the exactly same problem. I've managed to get OTRS 2.4.5 connected the same way to a MSSQL but 3.0.10 seems to be harder.
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
zhakal
Znuny newbie
Posts: 47
Joined: 30 Jul 2011, 20:06
Znuny Version: 3.0.11

Re: DBI:Sybase problem

Post by zhakal »

Finally found the problem and how to fix it!! \o/

The installation guide manual installation for linux (RHEL/Centos/fedora etc..) without the RPM package should be updated to include:

Changing the etc/sysconfig/selinux file with the following:
SELINUX=disabled

Then reboot. I found the solution on this page for a older installation of OTRS and it fixed the problem :D
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: [SOLVED] DBI:Sybase problem

Post by MichaelR »

Never liked SELINUX, it breaks way to many things XD
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
Post Reply