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/setup.md
+50-13Lines changed: 50 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,26 +3,19 @@
3
3
## Overview
4
4
Since LILA is a pl/sql package, only a few steps are required for commissioning and use.
5
5
6
-
All steps below are done in the oracle database.
7
-
8
6
Ultimately, three database objects are required:
9
7
* Two Tables
10
8
* One Sequence
11
9
12
-
In order to perform logging, the schema user must also have the necessary rights.
13
-
As a rule, these rights should already exist, as LILA is only an addition to existing PL/SQL packages.
14
-
If you got in trouble see the section [`Trouble Shooting`](#trouble-shooting)
10
+
All objects are created when the API is used for the first time.
11
+
Even if the names of the log tables deviate from the standard (the names can be optionally specified when using the API), they are created automatically.
12
+
This does not apply to the name of the Sequence, which is mandatory.
13
+
14
+
Also the schema user must have the necessary rights.
15
+
As a rule, these rights should already be in place, as LILA is only a supplement to existing PL/SQL packages.
15
16
16
17
## Login to database schema
17
18
Within your preferred sql tool (e.g. sqlDeveloper) login to the desired database schema.
18
-
All following steps will done in the same schema (except trouble shooting commands).
19
-
20
-
## Creating Sequence
21
-
First of all the Sequence for the process IDs must exist. Otherwise the packages cannot be compiled.
22
-
Execute the following statement:
23
-
```sql
24
-
CREATESEQUENCESEQ_LILA_LOG MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 10 NOORDER NOCYCLE NOKEEP NOSCALE GLOBAL;
25
-
```
26
19
27
20
## Creating Package
28
21
Is done by copy&paste and execute
@@ -34,6 +27,7 @@ That's it. If you got exceptions when executing the scripts please see [`Trouble
34
27
35
28
36
29
## Trouble shooting
30
+
### Permissions
37
31
Most problems are caused by insufficient permissions.
38
32
Log in to the database with DBA rights(*sys* or *system*).
39
33
Execute the following statements. You may want to try this iteratively, executing one statement at a time and attempting to perform the setup steps immediately after each one.
@@ -48,6 +42,49 @@ If the user who executes your scripts, is not the same, you have to grant one mo
48
42
```sql
49
43
GRANT EXECUTE ON<schema user>.LILA TO <another schema user>;
50
44
```
45
+
### Database Objects
46
+
If, for any reason, one or all of the three required database objects are not automatically created when using the API, they can be created manually using the following statements if necessary.
47
+
48
+
>If you want to use names for the log tables that do not correspond to the default, this must be taken into account in the corresponding statements (see below)!
49
+
50
+
#### Create Sequence
51
+
```sql
52
+
-- With executing the follogin statement the Sequence will be created
53
+
CREATESEQUENCESEQ_LILA_LOG MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 10 NOORDER NOCYCLE NOKEEP NOSCALE GLOBAL
54
+
```
55
+
56
+
#### Create Tables
57
+
```sql
58
+
-- Create MASTER Table
59
+
-- Customise the name of the MASTER table here if it differs from the default
60
+
createtableLILA_LOG (
61
+
id number(19,0),
62
+
process_name varchar2(100),
63
+
process_start timestamp(6),
64
+
process_end timestamp(6),
65
+
last_update timestamp(6),
66
+
steps_todo NUMBER,
67
+
steps_done number,
68
+
status number(1,0),
69
+
info clob
70
+
);
71
+
72
+
-- Create DETAIL Table
73
+
-- Customise the name of the DETAIL table here if it differs from the default
74
+
createtableLILA_LOG_DETAIL (
75
+
process_id number(19,0),
76
+
no number(19,0),
77
+
info clob,
78
+
log_level varchar2(10),
79
+
session_time timestamp DEFAULT SYSTIMESTAMP,
80
+
session_uservarchar2(50),
81
+
host_name varchar2(50),
82
+
err_stack clob,
83
+
err_backtrace clob,
84
+
err_callstack clob
85
+
);
86
+
```
87
+
51
88
52
89
## Testing
53
90
After all creation steps are done successfully, you can test LILA by calling the life check :)
0 commit comments