...
RED creates its metadata on schemas named ‘red’ and 'redadmin'. WhereScape Azkaban creates its metadata on a schema named ‘white’.
Warning |
---|
|
Database names for RED and WhereScape Azkaban metadata must be created in lowercase and not contain any special characters which would require surrounding in quotes (“”) in SQL queries. |
...
CREATE on the database to create the ‘red’ and 'redadmin' schemas and the metadata objects
Note |
---|
|
Occasionally RED and Azkaban metadata may change between versions and in some cases require the dropping of existing objects during an object upgrade, therefore the user (or role) used for an upgrade should be the owner of the objects, or a superuser will need to be used. |
...
2. Create an ODBC DSN for the database
Tip |
---|
|
Note: it is not recommended to enter username and password into the DSN as this will allow anyone with access to this machine to login to the database without credentials. Additionally the PostgreSQL driver does not currently store the password securely on Windows. |
...
Code Block |
---|
language | sql |
---|
title | Create RED User Role |
---|
|
-- Note this set of statements assumes you have already created
-- the RED Metadata using the admin user.
-- Create the RED user role and give grants to the metadata objects
CREATE ROLE reduser_role NOLOGIN ADMIN postgres;
-- You must run these GRANT's after connecting to the repo database, in psql run: '\c redrepo_db' to connect to the repo db
GRANT USAGE ON SCHEMA red TO reduser_role;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA red TO reduser_role;
GRANT EXECUTE ON ALL PROCEDURES IN SCHEMA red TO reduser_role;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA red TO reduser_role;
|
Tip |
---|
|
For each developer user of RED create an individual PostgreSQL user for them. |
...