[otrs-de] Otrs with Oracle? How do I get from A to Z?

Alexander Scholler alexander.scholler at augsburg.de
Mon Mai 8 13:31:56 CEST 2006


Hallo Tobias,

Du brauchst sicherlich DBD::Oracle für Dein Vorhaben.

Ich selbst nutze OTRS nicht mit Oracle, aber greife via DBI andersweitig 
über Perl auf Oracle zu (und genauso sollte es OTRS auch machen).

Ein beträchtlicher Teil meines langen Leidenweges bis zur Realisierung 
des Oracle-Zugriffes war die Kompilierung von DBD::Oracle unter Linux 
(Oracle läßt einen da ganzschön im Regen stehen mit ihren Supportseiten).

Hierzu habe ich mir folgende Aufzeichnungen gemacht:

############################

 > unzip -l oracle-instantclient-10.2.0.1-1.i386.zip
Archive:  oracle-instantclient-10.2.0.1-1.i386.zip
   Length     Date   Time    Name
  --------    ----   ----    ----
    288381  12-07-05 09:40   oracle-instantclient-devel-10.2.0.1-1.i386.rpm
  33449686  12-07-05 09:36   oracle-instantclient-basic-10.2.0.1-1.i386.rpm
   1481178  12-07-05 09:38   oracle-instantclient-jdbc-10.2.0.1-1.i386.rpm
    738536  12-07-05 09:39 
oracle-instantclient-sqlplus-10.2.0.1-1.i386.rpm
      4533  12-07-05 14:24   Installation Linux Client.rtf
  --------                   -------
  35962314                   5 files

Hiervon ist nur basis und devel erforderlich. sqlplus sollte jedoch 
ebenso installiert werden um über die Console DB-Abfragen durchführen zu 
können.
Die Variable LD_LIBRARY_PATH=/usr/instantclient/lib muss auf den 
Installationspfad gesetzt werden.
Die Kompilierung von DBD::Oracle erfolgt via CPAN, wobei jedoch der 
unter http://www.nntp.perl.org/group/perl.dbi.users/25638 beschriebene 
Patch angewandt werden muss:
Thanks to the devel package, I've got succeeded in making DBD::Oracle
with the Oracle Instant Client 10.1.0.3, no *.mk files, in my linux box.
My recipe is:

1) install both basic- and devel-10.1.0.3 rpm packages
2) export ORALCE_HOME="/usr/lib/oracle/10.1.0.3/client"
3) export LD_LIBRARY_PATH="$ORACLE_HOME/lib:$LD_LIBRARY_PATH"
4) modify the Makefile.PL file to bypass the find_headers() routine and
    to pass a correct -I flag to cc (the attached dirty patch is FYI)
5) execute the Makefile.PL * with the -l option *, perl Makefile.PL -l
6) make && make test && make install
#  I got many errors in t/30long.t (retrieving blobs ?)
#  but it seems to work fairly.

I hope this could help those who are annoyed with the "Unable to locate an
oracle.mk,..." error.

Happy DBing,

Satoshi

--- Makefile.PL.orig    2004-10-22 18:07:04.000000000 +0900
+++ Makefile.PL 2005-02-02 12:39:56.703125000 +0900
@@ -276,7 +276,7 @@
      print "Oracle sysliblist: $syslibs\n";
      my $libdir = ora_libdir();
      $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
-    my [at]h_dirs = find_headers();
+#    my [at]h_dirs = find_headers();
      if ($client_version_full =~ /^8.0.6/ && $os eq 'hpux') {
         $linkwith_msg = "-lextp -l$lib.";
         $opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
@@ -286,7 +286,8 @@
         $linkwith_msg = "-l$lib.";
         $opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
      }
-    my $inc = join " ", map { "-I$OH/$_" } [at]h_dirs;
+#    my $inc = join " ", map { "-I$OH/$_" } [at]h_dirs;
+    my $inc = "-I/usr/include/oracle/10.1.0.3/client";
      $opts{INC}  = "$inc -I$dbi_arch_dir";
  }
  else { # --- trawl the guts of Oracle's make files looking the how it 
wants to link

Es wurde festgestellt dass nicht jede DBD::Oracle-Sourceversionen 
kompatibel sind mit dem verwendeten Oracle-Client (konkret ließ sich die 
DBD::Oracle-Kompilierung nicht durchführen).

############################

Ich hoffe es hilft.

Solltest Du noch weitere Fragen haben dann denke ich ist die direkte 
Mailkommunikation besser als über die OTRS-Liste - schließlich ist's j a 
nicht direkt ein OTRS-Thema.

Gruß, Alexander



Tobias Menger schrieb:
> Hi everybody,
> 
>  
> 
> I got a question concerning Otrs and Oracle.
> 
>  
> 
> I have a ready setup Oracle database (Oracle 10) sitting and waiting on 
> one server (configured with the Otrs sql scipts provided with 2.1)  and 
> I want to connect to it via Otrs from a different machine. Now my 
> trouble is that I don’t know how to establish that communication. What 
> packets do I need to connect Otrs with Oracle via Appache? Where do I 
> put the packets if I need any? Also I am quite confused about Oracle.pm 
> and DBI.pm, as it seems that I need them! Where do I get them? What do I 
> need to add to the otrs/Kernel/Config.pm to properly set this up? Is 
> there any detailed documentation for an Otrs/Perl/Apache newbie to get 
> this problem solve?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> tb
> 
>  
> 
>  
> 
> PS: Answers in English and German accepted, I speak both! J thanks
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> OTRS Mailingliste: otrs-de - Webpage: http://otrs.org/
> Archiv: http://lists.otrs.org/pipermail/otrs-de/
> Listenabo verwalten: http://lists.otrs.org/cgi-bin/listinfo/otrs-de/
> Support oder Consulting fuer Ihr OTRS System?
> => http://www.otrs.de/