Setting up the database for general useΒΆ
Below the steps are described that need to be taken to set up the database. It is assumed that the pipeline is already installed according to the README (see also HOW-TO Use Git and that the environment can be started with the awe command.
In your
~/.awe/Environment.cfg
set:database_name : <tnsname of your database here> database_user : <name of the database account you created previously>
To test this you should start AWE and do:
import common.database.DBMain
You should get a prompt asking for your database password. If you are able to connect you can continue with the next step.
You may also enter your password in the
~/.awe/Environment.cfg
in the following way:database_password: <your Oracle password>
but for obvious reasons this is discouraged.
Create the
AWOPER
database account, theAWUSER
andAWREADONLYUSER
roles, as well as theAWNORMAL
andAWLIMITED
profiles. In addition the context is enforced and the requiredAWEUSER
,AWEPROJECTS
,AWEPROJECTUSERS
tables are created:awe awe/common/toolbox/dbawoper.py
Create the shared AWOPER schema for all database users using:
awe awe/common/toolbox/dbimportall.py
Create the Package Header and Body for the Oracle interface to the htm library using:
awe awe/common/toolbox/dbawutil.py
Note that you MUST have compiled and installed the _ohtm library in the Oracle tree.
Grant SELECT/INSERT/UPDATE permission on the AWOPER schema to the AWUSER role:
awe awe/common/toolbox/dbgrants.py
If new persistent classes are defined you should run this script as well to make sure that users have access to the new tables.
Add a new user to the database. The username should consist of the first initial followed by the complete surname of the user:
awe awe/common/toolbox/dbnewuser.py mjackson
Note that this will create a database account with AW as a prefix. In the above example the database account would be called AWMJACKSON.