In previous posts I gave the steps required to install Oracle R Enterprise on your Database server and your client machine.
One of the steps that I gave was the initial set of Database privileges that the DB needed to give to the RQUSER. The RQUSER is a little bit like the SCOTT/TIGER schema in the Oracle Database. Setting up the RQUSER as part of the installation process allows you to test that you can connect to the database using ORE and that you can issue some ORE commands.
After the initial testing of the ORE install you might consider locking this RQUSER schema or dropping it from the Database.
So when a new ORE user wants access to the database what steps does the DBA have to perform.
- Create a new schema for the user
- Grant the new schema the standard set of privileges to connect to the DB, create objects, etc.
- Create any data sets in their schema
- Create any views to data that exists in other schemas (and grant the necessary privileges, etc
Now we get onto the ORE specific privileges. The following are the minimum required for your user to be able to connect to their Oracle schema using ORE.
GRANT CREATE TABLE TO RQUSER;
GRANT CREATE PROCEDURE TO RQUSER;
GRANT CREATE VIEW TO RQUSER;
GRANT CREATE MINING MODEL TO RQUSER;
In most cases the first 3 privileges (TABLE, PROCEDURE and VIEW) will be standard for most schemas that you will set up. So in reality the only command or extra privilege that you will need to execute is:
GRANT CREATE MINING MODEL TO RQUSER;
This command will allow the user to connect to their Oracle schema using ORE, but what it will not allow them to do is to create any embedded R. These are R scripts that are stored in the database and can be called in their R/ORE scripts or by using the SQL API to R (I'll have more blog posts on these soon). To allow the user to create and use embedded R the DBA will also have to grant the following privilege as SYS:
GRANT RQADMIN to RQUSER;
To summarise the DBA will have to grant the following to each schema that wants to use the full power of ORE.
GRANT CREATE MINING MODEL TO RQUSER;
GRANT RQADMIN to RQUSER;
A note of Warning: Be careful what schemas you grant the RQADMIN privilege to. It is a powerful privilege and opens the database to the powerful features of R. So using the typical DBA best practice of granting privileges, the DBA should only grant the RQADMIN privilege to only the people who require it.
No comments:
Post a Comment