OracleDB: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 29: Zeile 29:
   rm -rf $SCRIPT
   rm -rf $SCRIPT
fi
fi
 
</pre>
= QT-Plugin für Oracle =
= QT-Plugin für Oracle =
* instantclient-basiclite-linux.x64-11.2.0.4.0.zip
* instantclient-basiclite-linux.x64-11.2.0.4.0.zip

Version vom 15. Februar 2017, 19:46 Uhr

Installation Oracle XE 11g

  • Minimum: 2G Swap, Paket: bc muss existieren
  • Als root: /etc/init.d/oracle-xe configure
  • service oracle-xe start

Environment für Kommandos

ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
ORACLE_SID=xe
ORA_BIN=/u01/app/oracle/product/11.2.0/xe/bin

User anlegen

#! /bin/bash
if [ "$1" = "" ] ; then
  echo "usage create_user <user> [<password>]"
else
  CODE=$2
  test -z "$CODE" && CODE=$1
  test -d "$ORACLE_HOME" || export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
  test -z "$ORACE_SID" || export ORACLE_SID=xe
  SCRIPT=/tmp/_create_user.inp
  test -f $SCRIPT && rm -rf $SCRIPT
  echo "CREATE USER $1 IDENTIFIED BY "$CODE" QUOTA 50M ON SYSTEM;" >>$SCRIPT
  echo "GRANT CREATE SESSION TO $1;" >>$SCRIPT
  echo "GRANT CREATE table TO $1;" >>$SCRIPT
  echo "quit" >>$SCRIPT
  sqlplus "SYS/SYS@xe AS SYSDBA" < $SCRIPT
  rm -rf $SCRIPT
fi

QT-Plugin für Oracle

  • instantclient-basiclite-linux.x64-11.2.0.4.0.zip
  • instantclient-sdk-linux.x64-11.2.0.4.0.zip
  • entpackt nach /opt/oracle_client/instantclient_11_2
cd /opt/Qt-mint/5.6/Src/qtbase/src/plugins/sqldrivers/oci
OCI_BASE=/opt/oracle_client/instantclient_11_2
OCI_INC_HOME=OCI_BASE/sdk/include
OCI_LIB_HOME=$OCI_BASE
qmake "INCLUDEPATH+=$OCI_INC_HOME/" "LIBS+=-L$OCI_LIB_HOME -lclntsh" oci.pro
make
cd /opt/Qt-mint/5.6/Src/qtbase/plugins/sqldrivers
cp libqsqloci.so /opt/Qt-mint/5.6/gcc_64/plugins/sqldrivers