Why does the SEQUENCE LIST Report SQL USE CREATEDBY instead of OWNER?

Document ID : KB000049906
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Here is an example of the SQL used to generate the SEQUENCE List report in RC/Query, note the WHERE clause uses CREATEDBY:

 SELECT A.NAME, A.SCHEMA, A.OWNER, A.CREATEDBY, A.SEQTYPE, A.SEQUENCEID       
 FROM SYSIBM.SYSSEQUENCES A 
 WHERE A.CREATEDBY = 'Z1TM001$'
 ORDER BY A.NAME ASC, A.SCHEMA ASC

Solution:

The CREATEDBY column from SYSSEQUENCES is used as the where clause predicate for the SQ/L report as it matches the customary usage of the CREATOR field which is specified in the SQ/L report request screen. The OWNER of a sequence may indicate the TBCREATOR column from SYSCOLUMNS if the sequence supports an identity column.

The CREATEDBY column will always indicate the Primary authorization ID of the user who created the sequence or identity column and provides a more consistent representation of the object Creator.