Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need a generic way to drop tables created by another user
>We have a process that will drop and re-create some tables each time it is
>run. These tables are shared by all users, so there is really only one copy,
>but we never know which user has actually created the tables. To handle
>this, we create PUBLIC SYNONYMs so that all users can access the tables
>transparently without qualification.
>
>This works great until we run the process that wants to drop the tables. At
>that point the DROP TABLE statement will fail as if the table doesn't exist.
>It appears that a SELECT statement will observe the synonym, yet the DROP
>statement will not.
>
>Is there any easy way to drop a table without knowing the creator or schema?
>I realize we could issue some SQL statements to read one of the system
>tables, determine the owner, then qualify the statement.
>
Sorry for my english, but I think the easy way to drop is read the ALL_SYNONYMS view and you can found the TABLE_OWNER.
I hope this help you
Andrea Savino
Oracle DBA
A.Savino_at_agora.stm.it
Received on Tue Mar 31 1998 - 00:00:00 CST