Why does the RC/Query SEQUENCE LIST Report SQL USE CREATEDBY instead of OWNER
search cancel

Why does the RC/Query SEQUENCE LIST Report SQL USE CREATEDBY instead of OWNER

book

Article ID: 49906

calendar_today

Updated On:

Products

RC/Query for DB2 for z/OS

Issue/Introduction

Here is an example of the SQL used to generate the SEQUENCE List report in RC/Query for Db2 for z/OS (RCQ), 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 = 'xxxxxxxx'
 ORDER BY A.NAME ASC, A.SCHEMA ASC

Resolution

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.