Skip to content

Commit

Permalink
doc: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylyjones committed Jun 28, 2024
1 parent b1bdf9b commit 7b501e3
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions libs/connector-oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,52 @@ If you need to develop on multiple libs at the same time (ex: want to update a c

- Depend on a local lib: `pnpm add <lib>`, ex: `pnpm add @azimutt/models`
- "Publish" lib locally by building it: `pnpm run build`

## Oracle Setup

### Run in Docker

You can use the free version of Oracle Database

```bash
docker pull container-registry.oracle.com/database/free:latest
```

To launch a container, the needed configuration is the `ORACLE_PWD` of the `SYS` user. You can also map the default 1521 port to your computer.

```bash
docker run -d --name oracle -p 1521:1521 -e ORACLE_PWD=oracle container-registry.oracle.com/database/free:latest
```

To connect, you can use a jdbc driver with the URL `jdbc:oracle:thin:<user>/<password>@//localhost:1521/FREE`

### Setup a user

Create a user

```sql
CREATE USER "C##AZIMUTT" IDENTIFIED BY "azimutt";
```

Grand permissions

```sql
GRANT CONNECT, RESOURCE, DBA TO "C##AZIMUTT";
```

Update user quota on `Users` tablespace

```sql
ALTER USER "C##AZIMUTT" QUOTA UNLIMITED ON USERS;
```

### Create a table

```sql
CREATE TABLE "C##AZIMUTT"."USERS"(
user_id NUMBER GENERATED BY DEFAULT AS IDENTITY,
first_name VARCHAR2(50) NOT NULL,
last_name VARCHAR2(50) NOT NULL,
PRIMARY KEY(user_id)
);
```

0 comments on commit 7b501e3

Please sign in to comment.