In Oracle databases, quotas in tablespaces are used to control the amount of space that a user can use in a specific tablespace. This is helpful for managing disk space and ensuring that no single user consumes an excessive amount of resources.
To assign a quota to a user, you use the ALTER USER statement. For example:
ALTER USER username QUOTA size ON tablespace_name;
For Example:
ALTER USER PDBUSER QUOTA 500M ON users;
To remove a quota, set the quota to 0 or use the UNLIMITED keyword to allow unlimited usage:
ALTER USER username QUOTA 0 ON tablespace_name;
-- or
ALTER USER username QUOTA UNLIMITED ON tablespace_name;
For Example:
ALTER USER PDBUSER QUOTA 0 ON users;
You can view quota information using data dictionary views such as DBA_TS_QUOTAS.
SELECT tablespace_name, username, bytes, max_bytes
FROM dba_ts_quotas
WHERE username = 'USERNAME';
For Example:
SELECT tablespace_name, username, bytes, max_bytes
FROM dba_ts_quotas
WHERE username = 'PDBUSER';