CREATE PROFILE clerk LIMIT
SESSIONS_PER_USER 1
IDLE_TIME 30
CONNECT_TIME 600;
CREATE USER jfee
IDENTIFIED BY wildcat
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp_ts
QUOTA 500K ON users
PROFILE clerk;
CREATE USER tsmith
IDENTIFIED BY bedrock
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp_ts
QUOTA unlimited ON users;
SELECT * FROM sys.dba_users;
USERNA USER_ID PASSWORD DEFAUL TEMPOR CREATED PROFILE
------ -------- ---------------- ------ ------ --------- --------
SYS % 522D06CDE017CF93 SYSTEM SYSTEM 31-JUL-90 PUBLIC...
SYSTEM % 9B30B3EB7A7EE46A SYSTEM SYSTEM 31-JUL-90 PUBLIC...
JFEE % DEE4F647381D62C4 USERS TEMP_TS 12-SEP-90 CLERK
TSMITH % 4791F162172E7834 USERS TEMP_TS 12-SEP-90 PUBLIC...
All passwords are encrypted to preserve security.
SELECT * FROM sys.dba_role_privs where grantee = 'JFEE';
GRANTEE GRANTED_ROLE ADM DEF
-------------------------- ------------------------- --- ---
JFEE CLERK YES YES
JFEE PAYROLL NO NO
JFEE WEEKLY_ADMIN NO NO
SELECT * FROM sys.dba_ts_quotas;
TABLESPACE USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS
---------- ---------- ---------- ---------- ---------- ----------
SYSTEM SYSTEM 0 0 0 0
SYSTEM JFEE 0 512000 0 250
SYSTEM TSMITH 0 -1 0 -1
When specific quotas are assigned, the exact number is indicated in the MAX_BYTES column. Unlimited quotas are indicated by "-1".
SELECT * FROM sys.dba_profiles
ORDER BY profile;
PROFILE RESOURCE_NAME LIMIT
--------------- -------------------------------- --------------
CLERK COMPOSITE_LIMIT UNLIMITED
CLERK SESSIONS_PER_USER 1
CLERK CPU_PER_SESSION UNLIMITED
CLERK CPU_PER_CALL UNLIMITED
CLERK LOGICAL_READS_PER_SESSION UNLIMITED
CLERK LOGICAL_READS_PER_CALL UNLIMITED
CLERK IDLE_TIME 30
CLERK CONNECT_TIME 600
CLERK PRIVATE_SGA UNLIMITED
DEFAULT COMPOSITE_LIMIT UNLIMITED
DEFAULT SESSIONS_PER_USER UNLIMITED
DEFAULT CPU_PER_SESSION UNLIMITED
DEFAULT CPU_PER_CALL UNLIMITED
DEFAULT LOGICAL_READS_PER_SESSION UNLIMITED
DEFAULT LOGICAL_READS_PER_CALL UNLIMITED
DEFAULT IDLE_TIME UNLIMITED
DEFAULT CONNECT_TIME UNLIMITED
DEFAULT PRIVATE_SGA UNLIMITED
SELECT username, value || 'bytes' "Current session memory"
FROM v$session sess, v$sesstat stat, v$statname name
WHERE sess.sid = stat.sid
AND stat.statistic# = name.statistic#
AND name.name = 'session memory';
The amount of space indicated in "Current session memory" is allocated in the shared pool for each session connected through the multi-threaded server. You can limit the amount of memory allocated per user with the PRIVATE_SGA resource limit.
To see the maximum memory ever allocated to each session since the instance started, replace 'session memory' in the query above with 'max session memory'.