Re: Rebuild table
From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Fri, 24 Jun 2011 13:03:30 +0200
Message-ID: <4E046F02.20804_at_gmail.com>
On 23/06/2011 23:39, Wayne Smith wrote:
>
> Am I missing something?
>
>
> Public and private synonyms?
>
Date: Fri, 24 Jun 2011 13:03:30 +0200
Message-ID: <4E046F02.20804_at_gmail.com>
On 23/06/2011 23:39, Wayne Smith wrote:
>
> Am I missing something?
>
>
> Public and private synonyms?
>
If you're using CTAS + rename you don't need to worry about them (unless I'm missing something):
SQL> create table t as select * from dual;
Table created.
SQL> create public synonym t_pub for t;
Synonym created.
SQL> create synonym t_priv for t;
Synonym created.
SQL> create table tt as select * from t;
Table created.
SQL> drop table t;
Table dropped.
SQL> rename tt to t;
Table renamed.
SQL> select * from t_pub;
D
-
X
SQL> select * from t_priv;
D
-
X
The status of those synonyms changes after the drop but they become valid again the first time they are referenced after the rename.
Regards
Dimitre
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Jun 24 2011 - 06:03:30 CDT