I don't think sql GRANT command is valid against sql INDEX objects. It
doesn't make sense in SQL as you can never reference an index directly.
Only query optimizer is support to use it for alternate access plan
implementation and/or source of real time statistics.
If you're on the other hand using an sql INDEX as a regular keyed LF, I
guess only recourse you have is the GRTOBJAUT command as you've already
If you want to stick with RUNSQLSTM compatible statements, you can call
QCMDEXC as a stored procedure and embed the GRTOBJAUT command string in it.
It should work fine.
RPG & DB2 Summit | Minneapolis | October 1-4
Mike Cain - DB2 for i5/OS Temporary Indexes - The Good, The Bad, The Ugly
2007 System i Fall Technical Conference | Orlando | November 4-7
Celebrating 10-Years of SQL Performance Excellence on IBM System i, eServer
iSeries and the server affectionately known as the AS/400
Subject: SQL index authority
I have replaced a couple LFs with SQL indexes. However, I can't seem to
figure out how to grant authority to the indexes as I would using
GRTOBJAUT. I know how to do it with tables and views using the GRANT
stmt, but not indexes. I want the equivalent of GRTOBJAUT OBJ(INDEXA)
OBJTYPE(*FILE) USER(*PUBLIC) AUT(*CHANGE). Or am I looking at this in the
wrong way? Thanks.
This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact