Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
faq:migration-toolkit:recycle-bin [2019/06/12 09:10] administrator |
faq:migration-toolkit:recycle-bin [2019/07/25 13:21] darya.prikhodkina |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Why does a Bunch of Invalid Objects with Garbage Names Appear in Oracle ====== | + | ====== Why Does a Bunch of Invalid Objects with Garbage Names Appear in Oracle ====== |
- | Prior to Oracle 10g, a DROP command permanently removed objects from the database. In Oracle 10g a DROP command places the object in the recycle bin. The extents allocated to the segment are not reallocated until you purge the object. You can restore the object from the recycle bin at any time. | + | Prior to Oracle 10g a DROP command permanently removed objects from the database. In Oracle 10g a DROP command places an object to the recycle bin. The extents allocated to the segment will not be reallocated until you purge the object. You can restore the object from the recycle bin at any time. |
- | A recycle bin contains all the dropped database objects until, | + | A recycle bin contains all the dropped database objects, until |
*You permanently drop them with the PURGE command. | *You permanently drop them with the PURGE command. | ||
Line 10: | Line 10: | ||
*The tablespace needs to be extended. | *The tablespace needs to be extended. | ||
- | The usage of recycle bin can be turned on/off this way: | + | The usage of recycle bin can be enables/disabled this way: |
ALTER SESSION SET recyclebin = ON/OFF; -- for the current session | ALTER SESSION SET recyclebin = ON/OFF; -- for the current session | ||
Line 20: | Line 20: | ||
*//dba_recyclebin// - lists all dropped system-wide objects | *//dba_recyclebin// - lists all dropped system-wide objects | ||
- | For example you drop your table: | + | For example you drop a table: |
DROP TABLE drop_test; | DROP TABLE drop_test; | ||
- | Now you see the table with strange name like "//BIN$njeSgciWSy+6io3ZQS+Bug==$0//" | + | Now you see the table with a strange name like "//BIN$njeSgciWSy+6io3ZQS+Bug==$0//" |
- | It is your table but with the new name. You even can see it content using: | + | It is the same table but with a new name. You even can see its contents using: |
SELECT * FROM "BIN$njeSgciWSy+6io3ZQS+Bug==$0" | SELECT * FROM "BIN$njeSgciWSy+6io3ZQS+Bug==$0" | ||
Line 34: | Line 34: | ||
FLASHBACK TABLE drop_test TO BEFORE DROP; | FLASHBACK TABLE drop_test TO BEFORE DROP; | ||
- | Now you can see the latest version of your table again. | + | Now you can see the latest version of the table again. |
If you want to drop table permanently you should use: | If you want to drop table permanently you should use: | ||
Line 40: | Line 40: | ||
DROP TABLE drop_test PURGE; | DROP TABLE drop_test PURGE; | ||
- | And to empty all users recycle bin command | + | And to empty all users recycle bin please use the following command: |
PURGE RECYCLEBIN; | PURGE RECYCLEBIN; | ||
- | should be used. | ||
- | **NOTE:** All triggers for the dropped table are also put into recycle bin and their names are changed in the same way. | + | **NOTE:** All triggers for the dropped table are also placed into recycle bin and their names are changed in the same way. |
\\ | \\ |