pyqGrant Function (On-Premises Database)

This topic describes the pyqGrant function when used in an on-premises Oracle Database.

The pyqGrant function grants read privilege access to an OML4Py datastore or to a script in the OML4Py script repository.

Syntax

pyqGrant (
    V_NAME          VARCHAR2    IN
    V_TYPE          VARCHAR2    IN
    V_USER          VARCHAR2    IN     DEFAULT)

Parameters

Parameter Description
V_NAME The name of an OML4Py datastore or a script in the OML4Py script repository.
V_TYPE For a datastore, the type is datastore; for script the type is pyqScript.
V_USER The name of the user to whom to grant access.

Example 9-19 Granting Read Access to a script

-- Grant read privilege access to Scott.
BEGIN
  pyqGrant('pyqFun1', 'pyqscript', 'SCOTT');
END;
/

Example 9-20 Granting Read Access to a datastore

-- Grant read privilege access to datastore ds1 to SCOTT.
BEGIN
  pyqGrant('ds1', 'datastore', 'SCOTT');
END;
/

Example 9-21 Granting Read Access to a Script to all Users

-- Grant read privilege access to script RandomRedDots to all users.
BEGIN
  pyqGrant('pyqFun1', 'pyqscript', NULL);
END;
/

Example 9-22 Granting Read Access to a datastore to all Users

-- Grant read privilege access to datastore ds1 to all users.
BEGIN
  pyqGrant('ds1', 'datastore', NULL);
END;
/