Commit f1004e2f authored by Eric Cano's avatar Eric Cano
Browse files

Merge remote-tracking branch 'origin/master'

parents 40b379f6 d7e51628
......@@ -89,6 +89,8 @@ CREATE TABLE TAPE(
LAST_READ_TIME NUMERIC(20, 0),
LAST_WRITE_DRIVE VARCHAR(100),
LAST_WRITE_TIME NUMERIC(20, 0),
READ_MOUNT_COUNT NUMERIC(20, 0) DEFAULT 0,
WRITE_MOUNT_COUNT NUMERIC(20, 0) DEFAULT 0,
USER_COMMENT VARCHAR(1000) CONSTRAINT TAPE_UC_UN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT TAPE_CLUN_UN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT TAPE_CLHN_UN NOT NULL,
......
......@@ -109,3 +109,37 @@ If tests don't run, edit the /etc/resolv.conf file and add a line with
```
search cern.ch
```
## Setting an Oracle database for the CTA catalogue
1. Install the Oracle client
```bash
sudo yum install -y oracle-instantclient12.2-basic.x86_64
```
2. Install sqlplus that will allow you to query the CTA catalogue
```bash
#if necessary, enable all the repos
sudo yum install oracle-instantclient12.2-sqlplus.x86_64
```
You can test that the sqlplus runs via the command *sqlplus64*.
3. Install **oracle tns name** that will allow you to get all the informations about the database connection by just providing its name.
```bash
sudo yum install -y oracle-instantclient-tnsnames.ora.noarch
```
4. Update the **tns name** database by typing
```bash
sudo /etc/cron.hourly/tnsnames-update.cron
```
5. Install **rlwrap** tool that will make your life easier while dealing with sqlplus (allows to have an history of the typed commands for example)
```bash
sudo yum install rlwrap
```
6. Ask for your database credentials : *username*, *database*, *password*.
7. Try to connect to the database and execute a simple sql query.
```bash
rlwrap sqlplus64 username@database
#Then type your password
```
```sql
select table_name from user_tables;
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment