Oracle

Aus Limbas Wiki

Wechseln zu: Navigation, Suche
Diese Seite ist eine übersetzte Version der Seite Oracle und die Übersetzung ist zu 100 % abgeschlossen sowie aktuell.

<-- backt to Main Page


Oracle Express Installation (10gR2)

Required Packages

unixODBC
oracle-instantclient-basic-10.2.0.5-1.i386.rpm
oracle-instantclient-jdbc-10.2.0.5-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm
oracle-instantclient-devel-10.2.0.5-1.i386.rpm
oracle-instantclient-odbc-10.2.0.5-1.i386.rpm

Important!! Oracle-DB and client version must match!! Oracle-DB 10gR2 and clients 11gR2 are not compatible!!

http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

Installation

  • Download rpms at Oracle and install (standard path: /usr/lib/oracle/10.2.0.5/client/)
rpm -i oracle*.rpm
  • Change into the directory /etc/init.d/ and open the oracle configuration tool
oracle-xe configure
  • Set HTTP Port 8080 and listener 1521
  • Afterwards create user and password

Configuration of Clients

Create the file "tnsnames.ora" in the directory /usr/lib/oracle/10.2.0.5/client/ and adjust HOST and SERVICE-NAME.

LIMBAS =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.75)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SERVICE_NAME = XE)
   )
)

Adjust the file "profile.local" in the directory /etc/ die Datei and define the environment variable.

export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client/lib
export TNS_ADMIN=/usr/lib/oracle/10.2.0.5/client
export ORACLE_HOME=/usr/lib/oracle/10.2.0.5/client/bin
export NLS_LANG="GERMAN_GERMANY.WE8MSWIN1252"

Important! For Apache the environment variables must be defined seperately for example in /etc/init.d/apache2 (for OpenSuse)!

ODBC Driver

Add the following part in /etc/UnixODBC/odbc.ini

[Oracle10g]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
BindAsFLOAT = F
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle10g
DSN = Oracle10g
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = LIMBAS
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID = 

in /etc/UnixODBC/odbc.ini add the following part

[Oracle10g]
Description     = Oracle ODBC driver for Oracle 10g
Driver          = /usr/lib/oracle/10.2.0.5/client/lib/libsqora.so.10.1
Setup           =
FileUsage       =
CPTimeout       =
CPReuse         = 


Dependencies

cd /usr/lib/oracle/10.2.0.5/client/lib/
ldd libsqora.so.10.1

will show the following missing unixODBC dependency::
libodbcinst.so.1 => not found

cd /usr/lib
ln -s libodbcinst.so.2.0.0 libodbcinst.so.1

... solves the problem

Testing

The connection between client and server can be tested with the following command:

sqlplus Benutzername/Passwort@TNSNames-Eintrag

The ODBC connection can be tested as followed

isql -v Oracle10g Benutzername Passwort