Someone has accidentally dropped dual table.Now we need dual table and whats the way to bring it back to the original state before dropping of the dual table?
+2
A:
You could try the following. But normallly altering any dictionary object means your in big trouble.
step 1: revoke all privileges except for CREATE SESSION from this Someone person.
step 2: connect as sysdba
step 3:
create table dual
(dummy varchar2(1))
storage (initial 1)
/
insert into dual values('X')
/
create public synonym dual for dual
/
grant select on dual to public with grant option
/
Robert Merkwürdigeliebe
2010-05-12 06:46:01
step 1 alone merits upvote :)
rics
2010-05-12 06:54:14
giving +1 for step 1.
Anonymouse
2010-05-12 06:54:18
-1 for for Step 3.
René Nyffenegger
2010-05-12 07:08:09
@René Nyffenegger : could you tell us your objections. I'm always willing to learn.
Robert Merkwürdigeliebe
2010-05-12 07:50:15
You have already mentioned that `altering any dictionary object means your in big trouble`. Such a *big trouble* is that you invalidate your Oracle license.
René Nyffenegger
2010-05-12 08:59:26
So? The harm is done and if it works it works doesn't it. After all dual is just a table as any other. Besides the formal statement I provided about not editing the dictionary, I provided a solution that works. These statements a taken directly from dcore.bsp in $OH/rdbms/admin
Robert Merkwürdigeliebe
2010-05-12 10:40:38