Oracle database connection with SERVICE_NAME

Moderator: crythias

Locked
Tuxper
Znuny newbie
Posts: 3
Joined: 09 Aug 2011, 05:26
Znuny Version: 3.0.9
Real Name: Marat

Oracle database connection with SERVICE_NAME

Post by Tuxper »

Hi.
I use otrs 3.2.10 on CentOS box. Recentlly we have migrated from standalone Oracle database to Oracle RAC.
It means that if I used a SID of Oracle, now I have to use a SERVICE_NAME, because each node of Oracle RAC has own SID (rac1 and rac2).
SERVICE_NAME is rac.
I configured as:
$Self->{DatabaseHost} = '192.168.22.6';
$Self->{Database} = 'rac';
$Self->{DatabaseUser} = 'tickets';
$Self->{DatabasePw} = 'password';
$Self->{DatabaseDSN} = "DBI:Oracle:service_name=".$Self->{'Database'}.";host=".$Self->{'DatabaseHost'}.";port=1521";

But I've got error 500 (Internal Page Error).
How can I configure OTRS to use Oracle Service_NAME instead of SID?
ripio66
Znuny newbie
Posts: 1
Joined: 17 Oct 2013, 14:12
Znuny Version: 3.2.10
Real Name: José Luis
Company: --

Re: Oracle database connection with SERVICE_NAME

Post by ripio66 »

I asume that you have Oracle network installed and tnsnames propertly configured...

Try to set the following parameters into the .../otrs/Kernel/Config.pm file:

$Self->{DatabaseHost} = '192.168.22.6';
$Self->{Database} = 'rac';
$Self->{DatabaseUser} = 'tickets';
$Self->{DatabasePw} = 'password';
$Self->{DatabaseDSN} = "DBI:Oracle:$Self->{'Database'}";

If you have configured TNS network client of Oracle, you do not need to specify all the connection parameters into the Config.pm file

Do not forge to set the Oracle environmental variables...

In my case this Works when I run otrs.CheckDB.pm

Next: will I need to configure Apache? I don't know a this moments...
Tuxper
Znuny newbie
Posts: 3
Joined: 09 Aug 2011, 05:26
Znuny Version: 3.0.9
Real Name: Marat

Re: Oracle database connection with SERVICE_NAME

Post by Tuxper »

ripio66 wrote:I asume that you have Oracle network installed and tnsnames propertly configured...

Try to set the following parameters into the .../otrs/Kernel/Config.pm file:

$Self->{DatabaseHost} = '192.168.22.6';
$Self->{Database} = 'rac';
$Self->{DatabaseUser} = 'tickets';
$Self->{DatabasePw} = 'password';
$Self->{DatabaseDSN} = "DBI:Oracle:$Self->{'Database'}";

If you have configured TNS network client of Oracle, you do not need to specify all the connection parameters into the Config.pm file

Do not forge to set the Oracle environmental variables...

In my case this Works when I run otrs.CheckDB.pm

Next: will I need to configure Apache? I don't know a this moments...
Thank you very much.
Yes, it works for otrs.CheckDB.pl, but apache still show error 500.
There is a error in the log of apache:

[Mon Oct 21 09:56:50 2013] [error] [Mon Oct 21 09:56:50 2013] -e: Can't connect to database! at /opt/otrs//Kernel/System/CustomerUser/DB.pm line 106.\n\t(in cleanup) Can't locate object method "EventHandlerTransaction" via package "Kernel::System::Ticket" at /opt/otrs//Kernel/System/Ticket.pm line 7857.\n

What do you think about it?
Best regards.
Locked