USER_STORAGE view
The USER_STORAGE view contains details about storage and authority
entries
for user profiles.
Every user profile contains information used for managing ownership and authority
of objects. This view returns information about consumption of these authority-related entries,
including different categories of usage.
The information returned is similar to the detail from the Retrieve User Information (QSYRUSRI) API.
Information is broken down by SYSBAS and independent auxiliary storage pool (IASP). To see information for IASPs, the IASP must be varied on.
Authorization: The caller must have *OBJOPR and *READ authorities to the *USRPRF.
The following table describes the columns in the view. The system name is USER_STG. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
AUTHORIZATION_NAME | USER_NAME | VARCHAR(10) | User profile name. |
ASPGRP | ASPGRP | VARCHAR(10) | Name of the independent ASP or *SYSBAS. |
MAXIMUM_STORAGE_ALLOWED | MAXSTG | BIGINT Nullable
|
The maximum amount of auxiliary storage, in kilobytes, that can be
assigned to store permanent objects owned by the user. Contains the null value if the user does not have a maximum amount of allowed storage. |
STORAGE_USED | STGUSED | BIGINT | The amount of auxiliary storage, in kilobytes, occupied by the user's owned objects for this ASP group. |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() TEMP_AVAILABLE_PROFILE_
ENTRIES ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
![]() ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
![]() ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
![]() TEMP_PRIVATE_AUTHORITY_
ENTRIES ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
![]() ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
![]() ![]() |
![]() ![]() |
![]() Nullable
![]() |
![]() Contains the null value if ASPGRP is not *SYSBAS or if the user has no UDFS temporary authority entries. ![]() |
Examples
- Determine how much storage user SCOTTF has
consumed.
SELECT * FROM QSYS2.USER_STORAGE WHERE USER_NAME = 'SCOTTF';
Find user profiles that have reached at least 80% of their authority-related entry consumption.
WITH HIGH_USAGE_PROFILES AS ( SELECT AUTHORIZATION_NAME, DECIMAL( (DECIMAL(AVAILABLE_PROFILE_ENTRIES,21,2)/ (DECIMAL(AVAILABLE_PROFILE_ENTRIES,21,2) + DECIMAL(TOTAL_PROFILE_ENTRIES,21,2))) *100 ,5,2) AS PERCENT_USED FROM QSYS2.USER_STORAGE) SELECT AUTHORIZATION_NAME, PERCENT_USED FROM HIGH_USAGE_PROFILES WHERE PERCENT_USED >= 80;