Rebuild option privileges

Hi,
13.0.0.31 beta.
I have privileged user, who do not access to data but have select privilege on SELECT_CATALOG_ROLE (complicated to explain further).
When I use that privileged user (not owner) on rebuild table i get

what privilege do I need for that if I am not an owner?

Brg
Damir

You need privileges on the table being rebuilt. Turn on spool SQL and try the operation again to see which query caused the error, but that’s my guess.

Hi John

Problematic statement is:
Select 1
from MOBAPPO.ARCHIVE_BILL
where rownum = 1;
Error: ORA-01031: insufficient privileges
And I really do not have select privilege on that table.

But, I would like to ask a question that user that is preparing the rebuild may not be the same one that is actually executing one.
ALl right (access to dictionary I have but not influence on change data-very often security setting in many database).
Is that possible to implement in toad that behavior-generate script?
brg
Damir

It is probably safest to generate the script as the user who will be running the script. But that query isn’t really necessary, so I will remove it.

-John

Hi John,

IMHO, I never run generated script without some modifications (storage parameters, maybe to create inline PK constrain etc).
So it would be perfect to generate all you can and then leave to user how he/she will handle execution later.
Brg
Damir

Hi Damir,

Next beta, I will still run the SELECT but if there is an error, I won’t show it, and will continue on with script generation. However, if I detect that you can’t SELECT from the table, I will leave the RUN button disabled (since the script would fail if run as the current user from the Rebuild Table window), and I’ll put a comment at the top of the script. You can then copy/paste to the editor and do what you want with the script.

-John

Generate the script with user, that has started it…all you can.
Regardless I do not have select rights, please generate this part of the script like I have … this is the main point of mine ask.
Brg
Damir

Hi John,

Please place “Run” button somewhere up not as it is now.
I heard that careless press Next, Next and think Next is again and it is run…and all is started on production, what is mostly not OK.
So, please, place that button upper area so there could no mistake for “careless” or nervous" users.
:slight_smile:
Damir

We moved the main work of that window (the rebuilding of the table) to the “Next” button, to simplify things for new users. So they don’t have moments of looking around in a window, trying to figure out where they need to click next.

Maybe I’m wrong about this (and anyone reading this - please speak up), but I do think most users, when using this window, want to run the script right away.

But I get your point about accidentally clicking “Run”. So I’ll add a confirmation prompt there. Sometimes confirmations are annoying but I think one is needed in this case.

Hi John,

This is OK.
Just do not interfere with automated version, if it exists, so it can run smoothly as well.
Brg
Damir