Oracle Profile and Quota

The Oracle profile is concerned to limits of database resources that the user can use. It can be assigned to user. By default when the user is created, Oracle assigns DEFAULT profile.

To implement limit, it is required to enable resource limit.
SQL> Alter System set resource_limit = true scope=both;

Creating Profile
SQL>CREATE PROFILE test LIMIT
   FAILED_LOGIN_ATTEMPTS 5
   PASSWORD_LIFE_TIME 60
   PASSWORD_REUSE_TIME 60
   PASSWORD_REUSE_MAX 5
   PASSWORD_VERIFY_FUNCTION verify_function
   PASSWORD_LOCK_TIME 1/24
   PASSWORD_GRACE_TIME 10;

Changing after creating profile
SQL>ALTER PROFILE test LIMIT failed_login_attempts 3;

Assigning profile and quota to user
SQL>CREATE USER test
IDENTIFIED BY test
DEFAULT TABLESPACE testdata
TEMPORARY TABLESPACE temp
QUOTA 0 ON SYSTEM
QUOTA 0 ON SYSAUX
QUOTA UNLIMITED ON testdata
QUOTA 10M ON indx01
PROFILE test;

Here quota is the amount of space allocated to test user in different tablespaces.
Monitoring Quotas
SQL> SELECT * FROM user_ts_quotas;

Changing quota value
SQL> Alter user test quota 5M on testdata;
SQL> Alter user test quota unlimited on testdata;
Drop Profile with user
SQL>Drop profile test cascade;

Comments