Installation Oracle XE 11g
- Minimum: 2G Swap, Paket: bc muss existieren
- Als root: /etc/init.d/oracle-xe configure
- service oracle-xe start
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