Recycle Bin
来源:互联网 发布:数据库语言获取日期 编辑:程序博客网 时间:2024/06/13 04:53
What Is the Recycle Bin?
The recycle bin is actually a data dictionary table containing information about dropped objects. Dropped tables and any associated objects such as indexes, constraints, nested tables, and the likes are not removed and still occupy space. They continue to count against user space quotas, until specifically purged from the recycle bin or the unlikely situation where they must be purged by the database because of tablespace space constraints.
recycle bin 是一张包含被删除对象信息的数据字典表,包括被删除表、索引、约束等,这些对象没有真正被删除并一直占用着空间。可以用purge删除 recycle bin中的对象,或是当表空间容量不够用时,会自动清空recycle bin,但这种情况不太可能发生
Each user can be thought of as having his own recycle bin, because, unless a user has the SYSDBA
privilege, the only objects that the user has access to in the recycle bin are those that the user owns. A user can view his objects in the recycle bin using the following statement:
每一个用户只能看到属于自己的被删除的对象,除非该用户拥有sysdba的 权限。
When you drop a tablespace including its contents, the objects in the tablespace are not placed in the recycle bin and the database purges any entries in the recycle bin for objects located in the tablespace. The database also purges any recycle bin entries for objects in a tablespace when you drop the tablespace, not including contents, and the tablespace is otherwise empty. Likewise:
当你使用连同content一起删除表空间时,那么这个表空间上的回收站的里的对象会被删除.
When you drop a user, any objects belonging to the user are not placed in the recycle bin and any objects in the recycle bin are purged.
When you drop a cluster, its member tables are not placed in the recycle bin and any former member tables in the recycle bin are purged.
When you drop a type, any dependent objects such as subtypes are not placed in the recycle bin and any former dependent objects in the recycle bin are purged.
Object Naming in the Recycle Bin
When a dropped table is moved to the recycle bin, the table and its associated objects are given system-generated names. This is necessary to avoid name conflicts that may arise if multiple tables have the same name. This could occur under the following circumstances:
当一个被删除的表移到回收站后,系统自动给他生成一个名字,这个名字必须避免以下两种冲突
A user drops a table, re-creates it with the same name, then drops it again.
Two users have tables with the same name, and both users drop their tables.
BIN$unique_id$version
Unique_id
is a 26-character globally unique identifier for this object, which makes the recycle bin name unique across all databasesversion
is a version number assigned by the database
Enabling and Disabling the Recycle Bin
When the recycle bin is enabled, dropped tables and their dependent objects are placed in the recycle bin. When the recycle bin is disabled, dropped tables and their dependent objects are not placed in the recycle bin; they are just dropped, and you must use other means to recover them (such as recovering from backup).
Disabling the recycle bin does not purge or otherwise affect objects already in the recycle bin. The recycle bin is enabled by default.
禁用 recycle bin, recycle bin中已有的对象不会被清除,recycle bin功能默认是开启的
You enable and disable the recycle bin by changing the recyclebin
initialization parameter. This parameter is not dynamic, so a database restart is required when you change it with an ALTER
SYSTEM
statement.
recyclebin不是动态参数,需要重启才能起效
Restoring Tables from the Recycle Bin
Restoring Dependent Objects
When you restore a table from the recycle bin, dependent objects such as indexes do not get their original names back; they retain their system-generated recycle bin names. You must manually rename dependent objects to restore their original names. If you plan to manually restore original names for dependent objects, ensure that you make note of each dependent object's system-generated recycle bin name before you restore the table.
当你从recycle bin中恢复一个表时,依赖的对象例如索引不会回到原始的名字,你必须手动恢复他们的名字SQL> create table huang(id int) ;Table created.SQL> create index id_indx on huang(id);Index created.SQL> drop table huang;Table dropped.SQL> show recyclebinORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME---------------- ------------------------------ ------------ -------------------HUANG BIN$C33iYIh/OZDgUKjAgOkE9w==$0 TABLE 2014-12-31:02:40:09
SQL> flashback table huang to before drop;Flashback complete.
SQL> select INDEX_NAME,INDEX_TYPE from user_indexes where TABLE_NAME='HUANG';INDEX_NAME------------------------------------------------------------INDEX_TYPE------------------------------------------------------BIN$C33iYIh+OZDgUKjAgOkE9w==$0NORMALSQL> ALTER INDEX "BIN$C33iYIh+OZDgUKjAgOkE9w==$0" RENAME TO HUANG;Index altered.SQL> select INDEX_NAME,INDEX_TYPE from user_indexes where TABLE_NAME='HUANG';INDEX_NAME------------------------------------------------------------INDEX_TYPE------------------------------------------------------HUANGNORMAL
- Recycle Bin
- Recycle Bin
- Recycle Bin 回收站
- Oracle回收站(Recycle Bin)
- Oracle回收站(Recycle Bin)
- Using Oracle's recycle bin
- ORACLE回收站(Recycle Bin)
- 清除recycle bin中的对象
- Oracle10g新特性:Recycle Bin回收站
- Oracle10g新特性:Recycle Bin回收站
- 关于ORACLE 10g中的RECYCLE BIN
- 关于ORACLE 10g中的RECYCLE BIN
- Windows 2008 r2 开启Recycle Bin
- 关于ORACLE 11g中的RECYCLE BIN
- SharePoint 2010 IT Professional -- Recycle Bin
- 关于Recycle Bin是什么以及实验
- Windows中回收站(Recycle Bin)的存取方法
- Using Flashback Drop and Managing the Recycle Bin
- Android--怎样使一个Android应用不被杀死?(整理)
- web Service入门
- 代理模式Proxy对付记不住密码的技巧
- Oracle V$SYSTEM_EVENT字段等解释
- C++ Primer(复制控制)
- Recycle Bin
- openstack分析-eventlet
- 第十九周oj刷题:时间差
- 为ORACLE表空间或临时表空间增加数据文件
- jsp页面上显示天气预报和动态时间
- zoj1061 Web Navigation (栈——基础练习)
- 2014年最后一日
- 将android插件做成U3D专用插件
- FFOS 1.4耳机线控架构实现