USER_STORAGE view
The USER_STORAGE view contains details about storage by user profile.
The user storage consumption detail is determined by using Retrieve User Information (QSYRUSRI) API.
You must have *OBJOPR and *READ authority to a *USRPRF or it will not be returned. To see information for independent ASPs (iASPs), the iASP must be varied on.
User storage is broken down by SYSBAS and iASPs.
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) Nullable
|
User profile name. |
ASPGRP | ASPGRP | VARCHAR(10) Nullable
|
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 null if the user does not have a maximum amount of allowed storage. |
STORAGE_USED | STGUSED | BIGINT Nullable
|
The amount of auxiliary storage (in kilobytes) occupied by the user's owned objects for this ASPGRP. |
Example
Determine how much storage user SCOTTF has
consumed.
SELECT * FROM QSYS2.USER_STORAGE
WHERE USER_NAME = 'SCOTTF'