Database Preparation and Grants
Use a dedicated Oracle Database user for the Agent Factory repository. This user owns Agent Factory application tables, configuration metadata, workflow definitions, and runtime state. Do not use this schema to store unrelated application data.
If you install in Quickstart mode, the installer creates and configures the local database container for you. Use this page for production mode, OCI Marketplace deployments, and any deployment that connects Agent Factory to a database that you manage.
Required Users
Agent Factory expects these users:
| User | Purpose |
|---|---|
<DB_USER> |
Primary Agent Factory repository user. Owns application tables and runtime metadata. |
AAI_RO_<DB_USER> |
Read-only companion user used by database access paths that should not run with the owner user’s privileges. |
Create both users before you finish production setup. If the read-only user is missing, database-related features and validation checks can fail even when the primary user can connect.
Example Grants for a PDB or Non-Autonomous Database
Run the following example as a privileged database administrator in the target PDB. Replace placeholders with your actual user name and password.
CREATE USER <DB_USER> IDENTIFIED BY <DB_PASSWORD>
DEFAULT TABLESPACE USERS
QUOTA UNLIMITED ON USERS;
GRANT CONNECT, RESOURCE, CREATE TABLE, CREATE SYNONYM, CREATE DATABASE LINK,
CREATE ANY INDEX, INSERT ANY TABLE, CREATE SEQUENCE, CREATE TRIGGER,
CREATE USER, DROP USER TO <DB_USER>;
GRANT CREATE SESSION TO <DB_USER> WITH ADMIN OPTION;
GRANT READ, WRITE ON DIRECTORY DATA_PUMP_DIR TO <DB_USER>;
GRANT SELECT ON SYS.V_$PARAMETER TO <DB_USER>;
CREATE USER AAI_RO_<DB_USER> IDENTIFIED BY <DB_PASSWORD> ACCOUNT UNLOCK;
GRANT CREATE SESSION TO AAI_RO_<DB_USER>;
Autonomous Database Grant Syntax
For Autonomous Database, qualify the dynamic performance view with the SYS schema:
GRANT SELECT ON SYS.V_$PARAMETER TO <DB_USER>;
Do not use GRANT SELECT ON V$PARAMETER for Autonomous Database setup. Some Autonomous Database environments reject that syntax. Agent Factory validation checks the privilege against SYS.V_$PARAMETER.
Validation Checks
After creating users and grants, connect as <DB_USER> and validate the database setup.
SELECT value
FROM sys.v_$parameter
WHERE name = 'max_string_size';
The value must be EXTENDED for production installations.
Then verify that the read-only user exists:
SELECT username
FROM all_users
WHERE username = 'AAI_RO_<DB_USER>';
Use uppercase for the user name in the validation query unless your environment intentionally created quoted mixed-case users.
Troubleshooting
| Symptom | Likely cause | Action |
|---|---|---|
GRANT SELECT ON V$PARAMETER fails in Autonomous Database |
The view must be referenced as SYS.V_$PARAMETER. |
Run GRANT SELECT ON SYS.V_$PARAMETER TO <DB_USER>;. |
Database validation cannot check max_string_size |
<DB_USER> cannot query SYS.V_$PARAMETER. |
Re-run the grant using the syntax above. |
| Database or Data Analysis Agent setup fails after the primary user connects | AAI_RO_<DB_USER> was not created or cannot create a session. |
Create the read-only user and grant CREATE SESSION. |
Production install reports max_string_size is not valid |
MAX_STRING_SIZE is not set to EXTENDED. |
Follow the MAX_STRING_SIZE procedure in the OS-specific setup page before continuing. |
| Data Analysis Agent cannot use expected objects | The database source user cannot see those tables or views, or the selected object list is incomplete. | Grant appropriate read access to the database source user and select the required tables/views when creating the agent. |