Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I tried dropping a table and then when i viewed the recycle bin nothing was there in it . Earlier too i dropped tables many a times but I was surprised to find no objects whatsover in it . What's the deal ?

[update]:

i had tried

   SHOW PARAMETER RECYCLEBIN;

Its VALUE column shows it as ON . So fine here !

Then i droppped an existing table but still the command

    Select object_name from recyclebin;

and any such retrieval of columns is showing NO ROWS SELECTED !!

Also using flashback command confirms that recyclebin is not having any such dropped tables !!

So where are dropped tables going ?

And one more thing :

This time i tried using

 ALTER SYSTEM SET RECYCLEBIN=ON;  

Instead of Alter session and sqlplus throws an error :

Specified initialization parameter is not modifiable with this option

So, is this because that i am working as a SYSTEM ?? i have not created any other USER as of now .

share|improve this question
add comment

migrated from stackoverflow.com Jan 22 '12 at 16:39

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 3 down vote accepted

It's likely that recyclebin isn't turned on. Check in your init.ora file to ensure it is. You can check your parameter:

select *
from   V$PARAMETER
where  NAME = 'recyclebin';

And turn it on at session level...

ALTER SESSION SET RECYCLEBIN=ON;

...and then try a drop.

Also, check both USER_RECYCLEBIN and DBA_RECYCLEBIN for entries.

EDIT: I see you've updated to say you are logged in as the SYSTEM user. For some reason, flashback/recyclebin does NOT work for SYS. I can't find a good reason why but it just doesn't. Create a new user and try creating and dropping a table while logged in as them. I'm sure you'll find that the recyclebin works fine then.

share|improve this answer
    
i cant find any relevant entries in this init.ora file for recycle bin and i ran the command but in that too it seems nothing that i can do with it !! –  kushal Jan 20 '12 at 6:59
    
Updated my answer to mention that flashback won't work in the SYSTEM tablespace. –  John Doyle Jan 20 '12 at 15:38
    
yeah ,man just came to update the same . But you already did. –  kushal Jan 22 '12 at 17:28
    
and i still don't understand the first command up there . Its neither working as SYSTEM user nor as any other user. So please edit it . –  kushal Jan 22 '12 at 17:30
add comment

It sounds like the recycle bin is on and should be working. The only thing I can think of is that you are using the PURGE option on your DROP commands -- is that the case?

The error you got from the ALTER SYSTEM command means exactly what it says -- the RECYCLEBIN option cannot be changed in that manner. According to the documentation, you need to use the DEFERRED option, meaning that it will take effect for any new sessions but not for currently active ones. But in any case, it sounds like the parameter is already on.

share|improve this answer
    
Indeed It is and i am not even touching PURGE as of now . –  kushal Jan 20 '12 at 13:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.