Skip to content

Commit 3c1e55e

Browse files
authored
Update setup.md
1 parent eabb533 commit 3c1e55e

1 file changed

Lines changed: 50 additions & 13 deletions

File tree

docs/setup.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,19 @@
33
## Overview
44
Since LILA is a pl/sql package, only a few steps are required for commissioning and use.
55

6-
All steps below are done in the oracle database.
7-
86
Ultimately, three database objects are required:
97
* Two Tables
108
* One Sequence
119

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.
1516

1617
## Login to database schema
1718
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-
CREATE SEQUENCE SEQ_LILA_LOG MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 10 NOORDER NOCYCLE NOKEEP NOSCALE GLOBAL;
25-
```
2619

2720
## Creating Package
2821
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
3427

3528

3629
## Trouble shooting
30+
### Permissions
3731
Most problems are caused by insufficient permissions.
3832
Log in to the database with DBA rights(*sys* or *system*).
3933
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
4842
```sql
4943
GRANT EXECUTE ON <schema user>.LILA TO <another schema user>;
5044
```
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+
CREATE SEQUENCE SEQ_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+
create table LILA_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+
create table LILA_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_user varchar2(50),
81+
host_name varchar2(50),
82+
err_stack clob,
83+
err_backtrace clob,
84+
err_callstack clob
85+
);
86+
```
87+
5188

5289
## Testing
5390
After all creation steps are done successfully, you can test LILA by calling the life check :)

0 commit comments

Comments
 (0)