Recycle Bin

 


A new feature called Recycle Bin has been added to Oracle Database 10g. When a database object is dropped, it is stored in the recycle bin. If a table is dropped, the dependent objects in the table (such as index, constraints) are also stored in the recycle bin. The name of the object stored in the recycle bin is changed, the bin $$ prefix is ​​attached at the beginning of the name of the object. If a user accidentally drops a table or database object, it can be retrieved from the Recycle Bin; As a result, database recovery is not required. Recycle Bin Enable / Disable By default Recycle Bin is enabled. The command to view the current status of the recycle bin is given, or if the recycle bin is disabled, the following command must be given to enable it. Enable Recycle Bin for Specific Sessions Enable Recycle Bin of the Database The following command must be provided to disable the Recycle Bin for specific sessions. Disable the Recycle Bin for a specific session Disable the Recycle Bin of the database Displaying the contents of the Recycle Bin If any object is dropped, it is stored in the Recycle Bin. If you want to see the objects stored in the recycle bin, you have to query the recycle bin. To recycle bin query you need to enter the following command SELECT * FROM RECYCLEBIN; Or, SELECT * FROM USER_RECYCLEBIN; Or SELECT * FROM DBA_RECYCLEBIN; to view the information in the dropped table, the following command can be given to restore the object in the bicycle bin. For example, the object in the Recycle Bin has to be PURGE to permanently delete the object in the Recycle Bin. Once the object is PURGE it is no longer possible to get it back. Shows how to PURGE an object


EmoticonEmoticon