33cd source
44set -ev
55
6+ INSTALL_FILE=" install_headless_with_trigger.sql"
7+ if [[ ! -f " ${INSTALL_FILE} " ]]; then
8+ INSTALL_FILE=" install_headless.sql"
9+ fi
10+
611# install core of utplsql
712time " $SQLCLI " sys/$ORACLE_PWD @//$CONNECTION_STR AS SYSDBA << -SQL
813whenever sqlerror exit failure rollback
@@ -11,33 +16,33 @@ set verify off
1116
1217--alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)';
1318alter session set plsql_optimize_level=0;
14- @install_headless_with_trigger.sql $UT3_OWNER $UT3_OWNER_PASSWORD
19+ @${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD
1520SQL
1621
1722# Run this step only on second child job (12.1 - at it's fastest)
1823if [[ " ${TRAVIS_JOB_NUMBER} " =~ \. 2$ ]]; then
1924
2025 # check code-style for errors
21- time " $SQLCLI " $UT3_OWNER / $UT3_OWNER_PASSWORD @//$CONNECTION_STR @../development/utplsql_style_check.sql
26+ time " $SQLCLI " $UT3_DEVELOP_SCHEMA / $UT3_DEVELOP_SCHEMA_PASSWORD @//$CONNECTION_STR @../development/utplsql_style_check.sql
2227
2328 # test install/uninstall process
2429 time " $SQLCLI " sys/$ORACLE_PWD @//$CONNECTION_STR AS SYSDBA << -SQL
2530 set feedback off
2631 set verify off
2732 whenever sqlerror exit failure rollback
2833
29- @uninstall_all.sql $UT3_OWNER
34+ @uninstall_all.sql $UT3_DEVELOP_SCHEMA
3035 whenever sqlerror exit failure rollback
3136 declare
3237 v_leftover_objects_count integer;
3338 begin
3439 select sum(cnt)
3540 into v_leftover_objects_count
3641 from (
37- select count(1) cnt from dba_objects where owner = '$UT3_OWNER '
42+ select count(1) cnt from dba_objects where owner = '$UT3_DEVELOP_SCHEMA '
3843 where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
3944 union all
40- select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER '
45+ select count(1) cnt from dba_synonyms where table_owner = '$UT3_DEVELOP_SCHEMA '
4146 where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
4247 );
4348 if v_leftover_objects_count > 0 then
5257 set verify off
5358
5459 alter session set plsql_optimize_level=0;
55- @install.sql $UT3_OWNER
56- @install_ddl_trigger.sql $UT3_OWNER
57- @create_synonyms_and_grants_for_public.sql $UT3_OWNER
60+ @install.sql $UT3_DEVELOP_SCHEMA
61+ @install_ddl_trigger.sql $UT3_DEVELOP_SCHEMA
62+ @create_synonyms_and_grants_for_public.sql $UT3_DEVELOP_SCHEMA
5863SQL
5964
6065fi
@@ -65,8 +70,8 @@ set feedback off
6570whenever sqlerror exit failure rollback
6671
6772--------------------------------------------------------------------------------
68- PROMPT Adding back create-trigger privilege to $UT3_OWNER for testing
69- grant administer database trigger to $UT3_OWNER ;
73+ PROMPT Adding back create-trigger privilege to $UT3_DEVELOP_SCHEMA for testing
74+ grant administer database trigger to $UT3_DEVELOP_SCHEMA ;
7075
7176--------------------------------------------------------------------------------
7277PROMPT Creating $UT3_TESTER - Power-user for testing internal framework code
@@ -76,27 +81,27 @@ grant create session, create procedure, create type, create table to $UT3_TESTER
7681
7782grant execute on dbms_lock to $UT3_TESTER ;
7883
79- PROMPT Granting $UT3_OWNER code to $UT3_TESTER
84+ PROMPT Granting $UT3_DEVELOP_SCHEMA code to $UT3_TESTER
8085
8186begin
8287 for i in (
8388 select object_name from all_objects t
8489 where t.object_type in ('PACKAGE','TYPE')
85- and owner = 'UT3 '
90+ and owner = '$UT3_DEVELOP_SCHEMA '
8691 and generated = 'N'
8792 and object_name not like 'SYS%')
8893 loop
89- execute immediate 'grant execute on $UT3_OWNER ."'||i.object_name||'" to $UT3_TESTER ';
94+ execute immediate 'grant execute on $UT3_DEVELOP_SCHEMA ."'||i.object_name||'" to $UT3_TESTER ';
9095 end loop;
9196end;
9297/
9398
94- PROMPT Granting $UT3_OWNER tables to $UT3_TESTER
99+ PROMPT Granting $UT3_DEVELOP_SCHEMA tables to $UT3_TESTER
95100
96101begin
97- for i in ( select table_name from all_tables t where owner = 'UT3 ' and nested = 'NO' and iot_name is null)
102+ for i in ( select table_name from all_tables t where owner = '$UT3_DEVELOP_SCHEMA ' and nested = 'NO' and iot_name is null)
98103 loop
99- execute immediate 'grant select on $UT3_OWNER .'||i.table_name||' to $UT3_TESTER ';
104+ execute immediate 'grant select on $UT3_DEVELOP_SCHEMA .'||i.table_name||' to $UT3_TESTER ';
100105 end loop;
101106end;
102107/
@@ -119,11 +124,11 @@ PROMPT Grants for testing distributed transactions
119124grant create public database link to $UT3_TESTER_HELPER ;
120125grant drop public database link to $UT3_TESTER_HELPER ;
121126
122- PROMPT Grants for testing coverage outside of main UT3 schema.
127+ PROMPT Grants for testing coverage outside of main $UT3_DEVELOP_SCHEMA schema.
123128grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type,
124129 select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table,
125130 select any dictionary, create any synonym, drop any synonym,
126- grant any object privilege, grant any privilege
131+ grant any object privilege, grant any privilege, create public synonym, drop public synonym
127132 to $UT3_TESTER_HELPER ;
128133
129134grant create job to $UT3_TESTER_HELPER ;
0 commit comments