Files
soci/scripts/travis/before_script_oracle.sh
Mateusz Łoskot 1f2343e328 [travis] Switch to Vincit/travis-oracledb-xe installer (#727)
Source: https://github.com/Vincit/travis-oracledb-xe
Author of the instaler, @elhigu, received permission from Oracle
to release this installer for use with Travis CI and others:
https://github.com/wnameless/docker-oracle-xe-11g/issues/118#issuecomment-473227959

Switch from apt-fast to apt-get.
Due to issues with certificate and/or keyserver,
installation of apt-fast has often been failing.
2019-04-14 00:12:14 +02:00

42 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Sets up environment for p6psy backend Oracle at travis-ci.org
#
# Copyright (c) 2013 Peter Butkovic <butkovic@gmail.com>
#
# Modified by Mateusz Loskot <mateusz@loskot.net>
# Changes:
# - Check connection as user for testing
#
source ${TRAVIS_BUILD_DIR}/scripts/travis/oracle.sh
echo "ORACLE_HOME=${ORACLE_HOME}"
echo "ORACLE_SID=${ORACLE_SID}"
# travis-oracle installer created travis user w/o password
echo "ALTER USER travis IDENTIFIED BY travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
echo "grant connect, resource to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
echo "grant create session, alter any procedure to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
# to enable xa recovery, see: https://community.oracle.com/thread/378954
echo "grant select on sys.dba_pending_transactions to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
echo "grant select on sys.pending_trans$ to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
echo "grant select on sys.dba_2pc_pending to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
echo "grant execute on sys.dbms_system to travis;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
# increase default=40 value of processes to prevent ORA-12520 failures while testing
echo "alter system set processes=100 scope=spfile;" | \
$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA
# check connection as user for testing
echo "Connecting using travis/travis@XE"
echo "SELECT * FROM product_component_version;" | \
$ORACLE_HOME/bin/sqlplus -S -L travis/travis@XE