You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/userguide/install.md
+64-11Lines changed: 64 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,16 +72,31 @@ The utPLSQL may be installed on any supported version of Oracle Database [see](h
72
72
* 12c
73
73
* 12c R2
74
74
* 18c
75
+
* 19c
75
76
76
77
# Headless installation
77
78
78
-
To install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql` as SYSDBA.
79
+
utPLSQL can be installed with DDL trigger, to enable tracking of DDL changes to your unit test packages.
80
+
This is the recommended installation approach, when you want to compile and run unit test packages in a schema containing huge amount of database packages (for example Oracle EBS installation schema).
81
+
The reason for having DDL trigger is to enable in-time annotation parsing for utPLSQL.
82
+
Without DDL trigger, utPLSQL needs to investigate your schema objects last_ddl_timestamp each time tests are executed to check if any of DB packages were changed in given schema and if they need scanning for annotation changes.
83
+
This process can be time-consuming if DB schema is large.
79
84
80
-
The script accepts three optional parameters that define:
85
+
The headless scripts accept three optional parameters that define:
81
86
- username to create as owner of utPLSQL (default `ut3`)
82
87
- password for owner of utPLSQL (default `XNtxj8eEgA6X6b6f`)
83
88
- tablespace to use for storage of profiler data (default `users`)
84
89
90
+
The scripts need to be executed by `SYSDBA`, in order to grant access to `DBMS_LOCK` and `DBMS_CRYPTO` system packages.
91
+
92
+
*Note:* Grant on `DBMS_LOCK` is required only for installation on Oracle versions below 18c. For versions 18c and above, utPLSQL uses `DBMS_SESSION.SLEEP` so access to `DBMS_LOCK` package is no longer needed.
93
+
94
+
*Note:* The user performing the installation must have the `ADMINISTER DATABASE TRIGGER` privilege. This is required for installation of trigger that is responsible for parsing annotations at at compile-time of a package.
95
+
96
+
## Installation without DDL trigger
97
+
98
+
To install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql` as SYSDBA.
99
+
85
100
Example invocation of the script from command line:
86
101
```bash
87
102
cdsource
@@ -94,16 +109,37 @@ cd source
94
109
sqlplus sys/sys_pass@db as sysdba @install_headless.sql utp3 my_verySecret_password utp3_tablespace
95
110
```
96
111
97
-
The script needs to be executed by `SYSDBA`, in order to grant access to `DBMS_LOCK` and `DBMS_CRYPTO` system packages.
112
+
## Installation with DDL trigger
113
+
114
+
To install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless_with_trigger.sql` as SYSDBA.
115
+
116
+
Example invocation of the script from command line:
117
+
```bash
118
+
cdsource
119
+
sqlplus sys/sys_pass@db as sysdba @install_headless_with_trigger.sql
120
+
```
121
+
122
+
Invoking script with parameters:
123
+
```bash
124
+
cdsource
125
+
sqlplus sys/sys_pass@db as sysdba @install_headless_with_trigger.sql utp3 my_verySecret_password utp3_tablespace
126
+
```
127
+
128
+
*Note:*
98
129
99
-
*Note:* Grant on `DBMS_LOCK` is required on Oracle versions below 18c
130
+
When installing utPLSQL into database with existing unit test packages, utPLSQL will not be able to already-existing unit test packages.
131
+
When utPSLQL was installed with DDL trigger, you have to do one of:
132
+
- Recompile existing Unit Test packages to make utPLSQL aware of their existence
133
+
- Invoke `exec ut_runner.rebuild_annotation_cache(a_schema_name=> ... );` for every schema containing unit tests in your database
100
134
135
+
Steps above are required to assure annotation cache is populated properly from existing objects.
136
+
Rebuilding annotation cache might be faster than code recompilation.
101
137
102
138
# Recommended Schema
103
139
It is highly recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema.
104
140
Installing uPLSQL into shared schema is really not recommended as you loose isolation of framework.
105
141
106
-
If the installation and utPLSQL owner user is one and the same, the user must have the following Oracle system permissions before you can proceed with the installation.
142
+
If the installing user and utPLSQL owner is one and the same, the user must have the following Oracle system permissions before you can proceed with the installation.
107
143
108
144
- CREATE SESSION
109
145
- CREATE PROCEDURE
@@ -113,6 +149,7 @@ If the installation and utPLSQL owner user is one and the same, the user must ha
113
149
- CREATE VIEW
114
150
- CREATE SYNONYM
115
151
- ALTER SESSION
152
+
- CREATE TRIGGER
116
153
117
154
In addition the user must be granted the execute privilege on `DBMS_LOCK` and `DBMS_CRYPTO` packages.
118
155
@@ -121,11 +158,9 @@ The uninstall process will **not** drop profiler tables, as they can potentially
121
158
122
159
It is up to DBA to maintain the storage of the profiler tables.
123
160
124
-
Additionally the user performing the installation must have a `ADMINISTER DATABASE TRIGGER` privilege. This is required for installation of trigger that is responsible for parsing annotations at at compile-time of a package.
125
-
126
161
# Manual installation procedure
127
162
128
-
###Creating schema for utPLSQL
163
+
## Creating schema for utPLSQL
129
164
To create the utPLSQL schema and grant all the required privileges execute script `create_utplsql_owner.sql` from the `source` directory with parameters:
130
165
131
166
-`user name` - the name of the user that will own of utPLSQL object
@@ -138,8 +173,8 @@ cd source
138
173
sqlplus sys/sys_password@database as sysdba @create_utPLSQL_owner.sql ut3 ut3 users
139
174
```
140
175
141
-
###Installing utPLSQL
142
-
To install the utPLSQL framework into your databaserun the `/source/install.sql`script and provide `schema_name`where utPLSQL is to be installed.
176
+
## Installing utPLSQL
177
+
To install the utPLSQL framework into your database, go to `source` directory, run the `install.sql`providing the `schema_name`for utPLSQL as parameter.
143
178
Schema must be created prior to calling the `install` script.
144
179
You may install utPLSQL from any account that has sufficient privileges to create objects in other users schema.
### Allowing other users to access the utPLSQL framework
187
+
## Installing DDL trigger
188
+
To minimize startup time of utPLSQL framework (especially on a database with large schema) it is recommended to install utPLSQL DDL trigger to enable utPLSQL annotation to be updated at compile-time.
189
+
190
+
It's recommended to install DDL trigger when connected as `SYSDBA` user. Trigger is created in utPLSQL schema.
191
+
If using the owner schema of utPLSQL to install trigger, the owner needs to have `ADMINISTER DATABASE TRIGGER` and `CREATE TRIGGER` system privileges.
192
+
If using different user to install trigger, the user needs to have `ADMINISTER DATABASE TRIGGER` and `CREATE ANY TRIGGER` system privileges.
193
+
194
+
To install DDL trigger go to `source` directory, run the `install_ddl_trigger.sql` providing the `schema_name` for utPLSQL as parameter.
0 commit comments