Skip to content

Commit ef892c4

Browse files
authored
Merge pull request #316 from jgebal/bugfix/install_guide_fixes
Fixes to install process
2 parents 47211ae + f04c073 commit ef892c4

File tree

5 files changed

+173
-169
lines changed

5 files changed

+173
-169
lines changed

docs/userguide/install.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/
2424

2525
# Headless installation
2626

27-
To simply install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql`.
27+
To simply install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql` as SYSDBA.
2828

2929
This will create a new user `UT3` with password `XNtxj8eEgA6X6b6f`, grant all needed privileges to that user and create PUBLIC synonyms needed to use the utPLSQL framework.
3030

3131
Example invocation of the script from command line:
3232
```bash
3333
cd source
34-
sqlplus admin/admins_password@xe @@install_headless.sql
34+
sqlplus sys/sys_pass@db as sysdba @@install_headless.sql
3535
```
3636

37+
SYSDBA is needed to grant access to DBMS_LOCK.
38+
3739

3840
# Recommended Schema
3941
It is recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema.
@@ -69,7 +71,7 @@ To create the utPLSQL schema and grant all the needed privileges execute script
6971
Example invocation:
7072
```bash
7173
cd source
72-
sqlplus admin/admins_password@database @create_utPLSQL_owner.sql ut3 ut3 users
74+
sqlplus sys/sys_password@database as sysdba @create_utPLSQL_owner.sql ut3 ut3 users
7375
```
7476

7577
### Installing utPLSQL

source/create_synonyms_and_grants_for_public.sql

Lines changed: 80 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -22,85 +22,89 @@ set feedback on
2222
set heading off
2323
set verify off
2424

25+
prompt Granting privileges on UTPLSQL objects in &&ut3_owner schema to PUBLIC
26+
2527
define ut3_owner = &1
26-
alter session set current_schema = &&ut3_owner;
2728

28-
prompt Granting privileges on UTPLSQL objects in &&ut3_owner schema to PUBLIC
29+
whenever sqlerror exit failure rollback
30+
whenever oserror exit failure rollback
31+
32+
alter session set current_schema = &&ut3_owner;
2933

30-
grant execute on ut_be_between to public;
31-
grant execute on ut_be_empty to public;
32-
grant execute on ut_be_false to public;
33-
grant execute on ut_be_greater_or_equal to public;
34-
grant execute on ut_be_greater_than to public;
35-
grant execute on ut_be_less_or_equal to public;
36-
grant execute on ut_be_less_than to public;
37-
grant execute on ut_be_like to public;
38-
grant execute on ut_be_not_null to public;
39-
grant execute on ut_be_null to public;
40-
grant execute on ut_be_true to public;
41-
grant execute on ut_equal to public;
42-
grant execute on ut_match to public;
43-
grant execute on ut to public;
44-
grant execute on ut_runner to public;
45-
grant execute on ut_teamcity_reporter to public;
46-
grant execute on ut_xunit_reporter to public;
47-
grant execute on ut_documentation_reporter to public;
48-
grant execute on ut_coverage_html_reporter to public;
49-
grant execute on ut_coverage_sonar_reporter to public;
50-
grant execute on ut_coveralls_reporter to public;
51-
grant execute on ut_reporters to public;
52-
grant execute on ut_varchar2_list to public;
53-
grant execute on ut_varchar2_rows to public;
54-
grant execute on ut_reporter_base to public;
55-
grant execute on ut_coverage to public;
56-
grant execute on ut_coverage_options to public;
57-
grant execute on ut_coverage_helper to public;
58-
grant insert, delete, select on ut_coverage_sources_tmp to public;
59-
grant execute on ut_output_buffer to public;
60-
grant execute on ut_file_mappings to public;
61-
grant execute on ut_file_mapping to public;
62-
grant execute on ut_file_mapper to public;
63-
grant execute on ut_key_value_pairs to public;
64-
grant execute on ut_key_value_pair to public;
65-
grant select, insert, delete on ut_cursor_data to public;
66-
grant execute on ut_sonar_test_reporter to public;
34+
grant execute on &&ut3_owner..ut_be_between to public;
35+
grant execute on &&ut3_owner..ut_be_empty to public;
36+
grant execute on &&ut3_owner..ut_be_false to public;
37+
grant execute on &&ut3_owner..ut_be_greater_or_equal to public;
38+
grant execute on &&ut3_owner..ut_be_greater_than to public;
39+
grant execute on &&ut3_owner..ut_be_less_or_equal to public;
40+
grant execute on &&ut3_owner..ut_be_less_than to public;
41+
grant execute on &&ut3_owner..ut_be_like to public;
42+
grant execute on &&ut3_owner..ut_be_not_null to public;
43+
grant execute on &&ut3_owner..ut_be_null to public;
44+
grant execute on &&ut3_owner..ut_be_true to public;
45+
grant execute on &&ut3_owner..ut_equal to public;
46+
grant execute on &&ut3_owner..ut_match to public;
47+
grant execute on &&ut3_owner..ut to public;
48+
grant execute on &&ut3_owner..ut_runner to public;
49+
grant execute on &&ut3_owner..ut_teamcity_reporter to public;
50+
grant execute on &&ut3_owner..ut_xunit_reporter to public;
51+
grant execute on &&ut3_owner..ut_documentation_reporter to public;
52+
grant execute on &&ut3_owner..ut_coverage_html_reporter to public;
53+
grant execute on &&ut3_owner..ut_coverage_sonar_reporter to public;
54+
grant execute on &&ut3_owner..ut_coveralls_reporter to public;
55+
grant execute on &&ut3_owner..ut_reporters to public;
56+
grant execute on &&ut3_owner..ut_varchar2_list to public;
57+
grant execute on &&ut3_owner..ut_varchar2_rows to public;
58+
grant execute on &&ut3_owner..ut_reporter_base to public;
59+
grant execute on &&ut3_owner..ut_coverage to public;
60+
grant execute on &&ut3_owner..ut_coverage_options to public;
61+
grant execute on &&ut3_owner..ut_coverage_helper to public;
62+
grant insert, delete, select on &&ut3_owner..ut_coverage_sources_tmp to public;
63+
grant execute on &&ut3_owner..ut_output_buffer to public;
64+
grant execute on &&ut3_owner..ut_file_mappings to public;
65+
grant execute on &&ut3_owner..ut_file_mapping to public;
66+
grant execute on &&ut3_owner..ut_file_mapper to public;
67+
grant execute on &&ut3_owner..ut_key_value_pairs to public;
68+
grant execute on &&ut3_owner..ut_key_value_pair to public;
69+
grant select, insert, delete on &&ut3_owner..ut_cursor_data to public;
70+
grant execute on &&ut3_owner..ut_sonar_test_reporter to public;
6771

6872
prompt Creating synonyms for UTPLSQL objects in &&ut3_owner schema to PUBLIC
6973

70-
create public synonym be_between for ut_be_between;
71-
create public synonym be_empty for ut_be_empty;
72-
create public synonym be_false for ut_be_false;
73-
create public synonym be_greater_or_equal for ut_be_greater_or_equal;
74-
create public synonym be_greater_than for ut_be_greater_than;
75-
create public synonym be_less_or_equal for ut_be_less_or_equal;
76-
create public synonym be_less_than for ut_be_less_than;
77-
create public synonym be_like for ut_be_like;
78-
create public synonym be_not_null for ut_be_not_null;
79-
create public synonym be_null for ut_be_null;
80-
create public synonym be_true for ut_be_true;
81-
create public synonym equal for ut_equal;
82-
create public synonym match for ut_match;
83-
create public synonym ut for ut;
84-
create public synonym ut_runner for ut_runner;
85-
create public synonym ut_teamcity_reporter for ut_teamcity_reporter;
86-
create public synonym ut_xunit_reporter for ut_xunit_reporter;
87-
create public synonym ut_documentation_reporter for ut_documentation_reporter;
88-
create public synonym ut_coverage_html_reporter for ut_coverage_html_reporter;
89-
create public synonym ut_coverage_sonar_reporter for ut_coverage_sonar_reporter;
90-
create public synonym ut_coveralls_reporter for ut_coveralls_reporter;
91-
create public synonym ut_reporters for ut_reporters;
92-
create public synonym ut_varchar2_list for ut_varchar2_list;
93-
create public synonym ut_varchar2_rows for ut_varchar2_rows;
94-
create public synonym ut_reporter_base for ut_reporter_base;
95-
create public synonym ut_coverage for ut_coverage;
96-
create public synonym ut_coverage_options for ut_coverage_options;
97-
create public synonym ut_coverage_helper for ut_coverage_helper;
98-
create public synonym ut_coverage_sources_tmp for ut_coverage_sources_tmp;
99-
create public synonym ut_output_buffer for ut_output_buffer;
100-
create public synonym ut_file_mappings for ut_file_mappings;
101-
create public synonym ut_file_mapping for ut_file_mapping;
102-
create public synonym ut_file_mapper for ut_file_mapper;
103-
create public synonym ut_key_value_pairs for ut_key_value_pairs;
104-
create public synonym ut_key_value_pair for ut_key_value_pair;
105-
create public synonym ut_cursor_data for ut_cursor_data;
106-
create public synonym ut_sonar_test_reporter for ut_sonar_test_reporter;
74+
create public synonym be_between for &&ut3_owner..ut_be_between;
75+
create public synonym be_empty for &&ut3_owner..ut_be_empty;
76+
create public synonym be_false for &&ut3_owner..ut_be_false;
77+
create public synonym be_greater_or_equal for &&ut3_owner..ut_be_greater_or_equal;
78+
create public synonym be_greater_than for &&ut3_owner..ut_be_greater_than;
79+
create public synonym be_less_or_equal for &&ut3_owner..ut_be_less_or_equal;
80+
create public synonym be_less_than for &&ut3_owner..ut_be_less_than;
81+
create public synonym be_like for &&ut3_owner..ut_be_like;
82+
create public synonym be_not_null for &&ut3_owner..ut_be_not_null;
83+
create public synonym be_null for &&ut3_owner..ut_be_null;
84+
create public synonym be_true for &&ut3_owner..ut_be_true;
85+
create public synonym equal for &&ut3_owner..ut_equal;
86+
create public synonym match for &&ut3_owner..ut_match;
87+
create public synonym ut for &&ut3_owner..ut;
88+
create public synonym ut_runner for &&ut3_owner..ut_runner;
89+
create public synonym ut_teamcity_reporter for &&ut3_owner..ut_teamcity_reporter;
90+
create public synonym ut_xunit_reporter for &&ut3_owner..ut_xunit_reporter;
91+
create public synonym ut_documentation_reporter for &&ut3_owner..ut_documentation_reporter;
92+
create public synonym ut_coverage_html_reporter for &&ut3_owner..ut_coverage_html_reporter;
93+
create public synonym ut_coverage_sonar_reporter for &&ut3_owner..ut_coverage_sonar_reporter;
94+
create public synonym ut_coveralls_reporter for &&ut3_owner..ut_coveralls_reporter;
95+
create public synonym ut_reporters for &&ut3_owner..ut_reporters;
96+
create public synonym ut_varchar2_list for &&ut3_owner..ut_varchar2_list;
97+
create public synonym ut_varchar2_rows for &&ut3_owner..ut_varchar2_rows;
98+
create public synonym ut_reporter_base for &&ut3_owner..ut_reporter_base;
99+
create public synonym ut_coverage for &&ut3_owner..ut_coverage;
100+
create public synonym ut_coverage_options for &&ut3_owner..ut_coverage_options;
101+
create public synonym ut_coverage_helper for &&ut3_owner..ut_coverage_helper;
102+
create public synonym ut_coverage_sources_tmp for &&ut3_owner..ut_coverage_sources_tmp;
103+
create public synonym ut_output_buffer for &&ut3_owner..ut_output_buffer;
104+
create public synonym ut_file_mappings for &&ut3_owner..ut_file_mappings;
105+
create public synonym ut_file_mapping for &&ut3_owner..ut_file_mapping;
106+
create public synonym ut_file_mapper for &&ut3_owner..ut_file_mapper;
107+
create public synonym ut_key_value_pairs for &&ut3_owner..ut_key_value_pairs;
108+
create public synonym ut_key_value_pair for &&ut3_owner..ut_key_value_pair;
109+
create public synonym ut_cursor_data for &&ut3_owner..ut_cursor_data;
110+
create public synonym ut_sonar_test_reporter for &&ut3_owner..ut_sonar_test_reporter;

0 commit comments

Comments
 (0)