ORACLE :Are grants removed when an object is dropped? ORACLE :Are grants removed when an object is dropped? oracle oracle

ORACLE :Are grants removed when an object is dropped?


Yes, once you drop the table, the grant is also dropped.

You could try to create a VIEW selecting from thetable and granting SELECT on that.

Your strategy of dropping a table regularly does not sound quite right to me though. Why do you have to do this?

EDIT

There are better ways than dropping the table every day.

  1. Add another column to thetable that states if the row is valid.

  2. Put an index on that column (or extend your existing index that you use to select from that table).

  3. Add another condition to your queries to only consider "valid" rows or create a view to handle that.

  4. When importing data, set the new rows to "new". Once the import is done, you can delete all "valid" rows and set the "new" rows to "valid" in a single transaction.

If the import fails, you can just rollback your transaction.


Perhaps the process that renames the table should also execute a procedure that does your grants for you? You could even get fancy and query the dictionary for existing grants and apply those to the renamed table.


No :"Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object."http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9019.htm#SQLRF01608

You must have another problem