Grant Privileges to an Existing Vector Database User

Granting privileges to an existing user involves:
  • Granting user roles
  • Enabling the schema for ORDS
  • Setting a table space quota
  • Enabling resource principal for the user
Use the following SQL to prepare the user and enable resource principal:
-- Add Roles (safe if already granted)

--For On-premises deployments
grant db_developer_role, create mining model to <VECTOR_USER>;
--For ADB-S
grant db_developer_role, oml_developer, oci$resource_principal to <VECTOR_USER>;

-- Enable REST (safe to re-run)
begin
  ords_admin.enable_schema(p_schema => '<VECTOR_USER>');
end;
/

-- Set Quota (overwrites existing quota)
ALTER USER <VECTOR_USER> QUOTA UNLIMITED ON data;


--For ADB-S: Enable Resource Principal (safe to re-run)
BEGIN
  DBMS_CLOUD_ADMIN.ENABLE_RESOURCE_PRINCIPAL(username => '<VECTOR_USER>');
END;
/