Developers Getting Started With i2b2
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following outlines the steps to take when creating the user accounts in your PostgreSQL database.

 

indent
Level1

1. Log into PostgreSQL using psql.

 $ su - postgres

 

 $ psql


indent
Level1

2. Create the following databases:


indent
Level3


Database

...

i2b2demodata

...

i2b2hive

...

i2b2imdata

...

i2b2metadata

...

i2b2pm

...

i2b2workdata

i2b2




indent
Level2

Example Command to create a database


indent
Level3


Panel
borderColor#ccc
bgColor#ffffff
titleBGColor#DDD9C3
borderStylesolid
titleCreate Database Command

    Create database

...

i2b2



indent
Level1

3. Create the following users:

CREATE USER i2b2demodata WITH PASSWORD '

...

demouser' ;

 

Grant all the privileges on the database

 GRANT ALL PRIVILEGES ON DATABASE i2b2demodata to i2b2demodata;

...

Level3

...

User Name

...

Password

...

Database

...

i2b2demodata

...

demouser

...

i2b2demodata

...

i2b2hive

...

demouser

...

i2b2hive

...

i2b2imdata

...

demouser

...

i2b2imdata

...

i2b2metadata

...

demouser

...

i2b2metadata

...

i2b2pm

...

demouser

...

i2b2pm

...

i2b2workdata

...

demouser

...

CREATE USER i2b2hive WITH PASSWORD 'demouser' ;
CREATE USER i2b2imdata WITH PASSWORD 'demouser' ;
CREATE USER i2b2metadata WITH PASSWORD 'demouser' ;
CREATE USER i2b2pm WITH PASSWORD 'demouser' ;
CREATE USER i2b2workdata WITH PASSWORD 'demouser' ; 

Create the Schema's

CREATE SCHEMA i2b2demodata AUTHORIZATION i2b2demodata ;
CREATE SCHEMA i2b2hive AUTHORIZATION i2b2hive ;
CREATE SCHEMA i2b2imdata AUTHORIZATION i2b2imdata; 
CREATE SCHEMA i2b2metadata AUTHORIZATION i2b2metadata ;
CREATE SCHEMA i2b2pm AUTHORIZATION i2b2pm ;
CREATE SCHEMA i2b2workdata AUTHORIZATION i2b2workdata;




Note
titleImportant


indent
Level1

Make sure you grant all privileges on all tables in the database to the appropriate user.


indent
Level1

Example: For the

i2b2demodata

i2b2 database you will grant all access to the i2b2demodata user.

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2demodata;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2hive;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2imdata;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2metadata;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2pm;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2workdata;

 GRANT ALL PRIVILEGES ON DATABASE i2b2 to i2b2demodata;