Hi,
 
I know that this topic has been discussed for some times. But I am not able to fix my problem.
First of all I would like to say that I am quit new to Unix/FreeBSD (and all related stuff).
 
Here is what I am trying todo. I would like to run otrs on FreeBSD. The Backend for otrs should be the mysql server on my FreeBSD. Agent User Backend should be Active Directory and Customer User Backend is on MS Sql in CRM 3.0.
 
I use FreeBSD 6.1 and OTRS 2.0.4
 
I have succesfully installed OTRS on my FreeBSD and it works. After this I changed the Agent Backend to my Active Directory and it also works. I have created on Customer for testing and all looks good.
 
Now I want to switch the customer bacend to my MS Sql DB. I have created a view that looks like the DB in mySQL.
I have installed FreeTDS and all other stuff I need to connect to MS SQL. I have created a little perl script to test my connection and it works. Here is the script (btw my first prl script):
 
#!/usr/local/bin/perl
use DBI;
my $dbh = DBI->connect('dbi:Sybase:server=MyServer2k;database=myCompany_MSCRM', 'myDom\myUser', 'myPassword');
my $rc;
my $sth;
$sth = $dbh->prepare("select * from OTRS_CustomerView;");
if($sth->execute) {
    while(@dat = $sth->fetchrow) {
        print "@dat\n";
    }
}
 
I changed the lines in Defaults.pm the DSN settings (should be in config.pm as I have read now):
    $Self->{CustomerUser} = {
        Name => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            # if you want to use an external database, add the
            # required settings
            DSN => 'dbi:Sybase:server=MyServer2k;database=myCompany_MSCRM',
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
            User => 'myDom\myUser',
            Password => 'myPassword',
            Table => 'OTRS_CustomerView',
        },

If I try to start otrs in my browser, the httpd-error.log will show this:
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55] ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: freebsd Time: Fri Jun 23 19:29:10 2006
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]  Message: Unknown database type! Set option Database::Type in Kernel/Config.pm to (mysql|postgresql|maxdb|oracle|db2|mssql).
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]  Traceback (3032):
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: Kernel::System::DB::new (v1.47) Line: 145
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: Kernel::System::CustomerUser::DB::new (v1.36) Line: 56
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: Kernel::System::CustomerUser::new (v1.22) Line: 80
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: Kernel::System::Ticket::new (v1.194) Line: 124
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: Kernel::System::Web::InterfaceAgent::Run (v1.8) Line: 181
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]    Module: /opt/otrs/bin/cgi-bin/index.pl (v1.80) Line: 47
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55]
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55] [Fri Jun 23 19:29:10 2006] index.pl: Use of uninitialized value in join or string at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 388.
[Fri Jun 23 19:29:10 2006] [error] [client 10.0.0.55] [Fri Jun 23 19:29:10 2006] index.pl:  at ../..//Kernel/System/CustomerUser/DB.pm line 56.

But I didn't find Database::Type Option in Defaults.pm or Config.pm. I have read some posts about this but could not figure out how it works.
So I looked in Module: Kernel::System::CustomerUser::DB::new and this line will call Module: Kernel::System::DB::new. And here - in DB.pm - I think we have the problem:
In line 105 otrs tries to get the DB Type while parsing the DSN. But there is nothing that will handle Sybase! And on line 127 I can see the option that was mentioned in the errorlog (Database::Type). So I would be able to hard code it here for a dirty workaround. But on line 135 otrs will check if DB::Type is set and will call:
Kernel::System::DB::$Self->{'DB::Type'}
 
So if I set DB::Type to mssql it will call Kernel::System::DB::mssql - But there is no such file. I would get: Can't load database backend module $GenericModule!
In opt/otrs/Kernel/System/DB there are only files for:
db2.pm, maxdb.pm, mysql.pm, oracle.pm, postgresql.pm
 
So where is mssql.pm or what type should I use?
 
thx in advance
Bjoern
 
 
 
 



 


Lernen Sie E-Mail von einer neuen Seite kennen: Windows Live Messenger - Beta
_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support orr consulting for your OTRS system?
=> http://www.otrs.com/

Reply via email to