OBJECT_OWNERSHIP view
The OBJECT_OWNERSHIP view returns ownership information for all objects.
The values returned for the columns in the view are closely related to the values returned by the WRKOBJOWN CL command and the List Objects User Is Authorized to, Owns, or Is Primary Group of (QSYLOBJA) API.
Authorization: The caller must have *READ authority to the user profile that owns the object.
The following table describes the columns in the view. The system name is OBJ_OWN. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
AUTHORIZATION_NAME | USER_NAME | VARCHAR(10) | User profile that owns the object. |
OBJECT_TYPE | OBJ_TYPE | VARCHAR(7) | The type of object. |
OBJECT_LIBRARY | LIBNAME | VARCHAR(10) Nullable
|
The name of the library containing the object. Contains the null value if OBJECT_NAME is null. |
OBJECT_NAME | NAME | VARCHAR(10) Nullable
|
The name of the object. Contains the null value if OBJECT_TYPE is *BLKSF, *CHRSF, *DIR, *FIFO, *STMF, or *SYMLNK. |
PATH_NAME | PATH_NAME | DBCLOB(16M) CCSID 1200
Nullable |
The path name of the object. Contains the null value if OBJECT_TYPE is not *BLKSF, *CHRSF, *DIR, *FIFO, *STMF, or *SYMLNK. |
OBJECT_ATTRIBUTE | ATTRIBUTE | VARCHAR(10) Nullable
|
The object's attribute. Contains the null value if there is no attribute for the object. |
TEXT_DESCRIPTION | TEXT | VARCHAR(50) Nullable
|
The descriptive text for this object. Contains the null value if the object has no text description. |
IASP_NAME | IASP_NAME | VARCHAR(10) | The auxiliary storage pool (ASP) device name where the object is stored. If the object is in the system ASP or one of the basic user ASPs, contains *SYSBAS. |
AUTHORITY_HOLDER | AUT_HOLDER | VARCHAR(3) | Whether the object is an authority holder.
|
AUTHORIZATION_LIST_MANAGEMENT | AUTL_MGMT | VARCHAR(3) Nullable
|
Whether AUTHORIZATION_NAME has authorization list management
authority to the object.
Contains the null value if OBJECT_TYPE is not *AUTL. |
OBJECT_AUTHORITY | OBJ_AUTH | VARCHAR(12) | The authority that AUTHORIZATION_NAME has to the object. Contains
one of the following special values:
|
OBJECT_OPERATIONAL | OBJOPER | VARCHAR(3) | Indicates the object operational authority for AUTHORIZATION_NAME.
|
OBJECT_MANAGEMENT | OBJMGT | VARCHAR(3) | The object management authority for AUTHORIZATION_NAME.
|
OBJECT_EXISTENCE | OBJEXIST | VARCHAR(3) | The object existence authority for AUTHORIZATION_NAME.
|
OBJECT_ALTER | OBJALTER | VARCHAR(3) | The object alter authority for AUTHORIZATION_NAME.
|
OBJECT_REFERENCE | OBJREF | VARCHAR(3) | The object reference authority for AUTHORIZATION_NAME.
|
DATA_READ | DATA_READ | VARCHAR(3) | The data read authority for AUTHORIZATION_NAME.
|
DATA_ADD | DATA_ADD | VARCHAR(3) | The data add authority for AUTHORIZATION_NAME.
|
DATA_UPDATE | DATA_UPD | VARCHAR(3) | The data update authority for AUTHORIZATION_NAME.
|
DATA_DELETE | DATA_DEL | VARCHAR(3) | The data delete authority for AUTHORIZATION_NAME.
|
DATA_EXECUTE | DATA_EXEC | VARCHAR(3) | The data execute authority for AUTHORIZATION_NAME.
|
Examples
- Return a list of all objects owned by user
FRANKDBA.
SELECT * FROM QSYS2.OBJECT_OWNERSHIP WHERE AUTHORIZATION_NAME = 'FRANKDBA';
- Return a list of only objects in the IFS that are owned by user
FRANKDBA.
SELECT * FROM QSYS2.OBJECT_OWNERSHIP WHERE AUTHORIZATION_NAME = 'FRANKDBA' AND PATH_NAME IS NOT NULL;