× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try
    CREATE OR REPLACE TABLE .....

> On 3/15/2018 2:10 PM, Steve Richter wrote:
grant all on repcus_stage to public with grant option

Object ----------Object-----------
User Group Authority Opr Mgt Exist Alter Ref
*PUBLIC USER DEF X X X X
*GROUP QPGMR *ALL X X X X X

public got object mgmt rights, but not object existence rights.

I have code that drops a table and then recreates it by selecting from a
bunch of input tables. Sometimes an interactive user runs the code. So they
own the table. Other times the code is run from a PHP web service. So the
web user owns the table. Need the code that creates the table to grant
authority to public to be able to drop the table.



On Thu, Mar 15, 2018 at 1:54 PM, Rob Berendt <rob@xxxxxxxxx> wrote:

To drop a table I believe you have to have *OBJMGT capabilities against
that object. Therefore the person running the GRANT ALL has to have that
or it skips adding *OBJMGT to the target.
However if add "WITH GRANT OPTION" I believe it will add *OBJMGT.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/db2/rbafzgnt.htm


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Steve Richter <stephenrichter@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 03/15/2018 01:48 PM
Subject: how grant privilege to drop table using SQL?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



in SQL, you can grant the public all rights to use a table:

GRANT ALL ON tableName TO PUBLIC

how to grant public the right to drop a table?

thanks,


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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 [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.