Warning, file /sdk/codevis/thirdparty/soci/scripts/ci/before_build_oracle.sh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #!/usr/bin/env bash
0002 # Configures Oracle database for SOCI Oracle backend CI builds.
0003 #
0004 # Copyright (c) 2013 Peter Butkovic <butkovic@gmail.com>
0005 #
0006 # Modified by Mateusz Loskot <mateusz@loskot.net>
0007 # Changes:
0008 # - Check connection as user for testing
0009 #
0010 # Copyright (c) 2021 Vadim Zeitlin <vz-soci@zeitlins.org>
0011 # - Rewrote to work with Docker Oracle container
0012 
0013 source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh
0014 
0015 # create the user for the tests
0016 oracle_sqlplus sys/oracle AS SYSDBA <<SQL
0017 create user travis identified by travis;
0018 grant connect, resource to travis;
0019 grant execute on sys.dbms_lock to travis;
0020 grant create session, alter any procedure to travis;
0021 SQL
0022 
0023 # increase default=40 value of processes to prevent ORA-12520 failures while testing
0024 echo "alter system set processes=300 scope=spfile;" | \
0025 oracle_sqlplus sys/oracle AS SYSDBA
0026 
0027 # restart the database for the parameter change above to be taken into account
0028 echo "Restarting the database..."
0029 oracle_exec /etc/init.d/oracle-xe restart
0030 
0031 # confirm the parameter modification was taken into account
0032 echo "show parameter processes;" | \
0033 oracle_sqlplus sys/oracle AS SYSDBA
0034 
0035 # check connection as user for testing
0036 echo "Connecting using travis/travis@XE"
0037 echo "SELECT * FROM product_component_version;" | \
0038 oracle_sqlplus travis/travis@XE