Start of change

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.

Table 1. OBJECT_OWNERSHIP view
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.
NO
The object is not an authority holder.
YES
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.
NO
The user does not have authorization list management authority.
YES
The user has authorization list management authority.

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:
*ALL
Allows all operations on the object except those that are limited to the owner or controlled by authorization list management authority.
*CHANGE
Allows all operations on the object except those that are limited to the owner or controlled by object existence authority, object alter authority, object reference authority, and object management authority.
*EXCLUDE
All operations on the object are prohibited.
*USE
Allows access to the object attributes and use of the object. The user cannot change the object.
USER DEFINED
The specific object authorities and data authorities do not match any of the predefined object authority levels.
OBJECT_OPERATIONAL OBJOPER VARCHAR(3) Indicates the object operational authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
OBJECT_MANAGEMENT OBJMGT VARCHAR(3) The object management authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
OBJECT_EXISTENCE OBJEXIST VARCHAR(3) The object existence authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
OBJECT_ALTER OBJALTER VARCHAR(3) The object alter authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
OBJECT_REFERENCE OBJREF VARCHAR(3) The object reference authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
DATA_READ DATA_READ VARCHAR(3) The data read authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
DATA_ADD DATA_ADD VARCHAR(3) The data add authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
DATA_UPDATE DATA_UPD VARCHAR(3) The data update authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
DATA_DELETE DATA_DEL VARCHAR(3) The data delete authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.
DATA_EXECUTE DATA_EXEC VARCHAR(3) The data execute authority for AUTHORIZATION_NAME.
NO
The user does not have this authority.
YES
The user has this authority.

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;
    
End of change