Oracle 10g recyclebin 使用限制

根据官方文档,我们使用recyclebin有以下限制:
[quote]A few limitations are associated with the recycle bin:
·Only non-SYSTEM locally managed tablespaces can have a recycle bin. However, dependent objects in a dictionary-managed tablespace are protected if the dropped object is in a locally managed tablespace.
·A table’s dependent objects are saved in the recycle bin when the table is dropped, except for bitmap join indexes, referential integrity constraints (foreign key constraints), and materialized view logs.
·Indexes are protected only if the table is dropped first; explicitly dropping an index does notplace the index into the recycle bin.[/quote]
当然使用recyclebin需要将参数RECYCLEBIN设置为on,该参数可以在系统级别或者会话级别打开。其官方解释为:
[quote]RECYCLEBIN is used to control whether the Flashback Drop capability is turned on or off. If the parameter is set to OFF, then dropped tables do not go into the recycle bin. If this parameter is set to ON, dropped tables go into the recycle bin and can be recovered.[/quote]
但是今天碰到一件怪事,在系统级别设置为off时,drop table照样在recyclebin存在。再次在会话级别设置为off时,才生效
[quote][ora10g@mcprod ~]$ sqlplus "zhou/zhou"

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Nov 20 11:42:13 2010

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> create table t as select * from zhou;
SQL> drop table t;
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T BIN$lXPP0Tic6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:42:27
SQL> show parameter rec
buffer_pool_recycle string
control_file_record_keep_time integer 7
db_recovery_file_dest string /Tbackup
db_recovery_file_dest_size big integer 10G
db_recycle_cache_size big integer 0
ldap_directory_access string NONE
recovery_parallelism integer 0
recyclebin string OFF
use_indirect_data_buffers boolean FALSE
SQL> create table tt as select * from sys.obj$;
SQL> drop table tt;
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T BIN$lXPP0Tic6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:42:27
TT BIN$lXPP0Tim6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:44:47
SQL> drop table zhou;
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T BIN$lXPP0Tic6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:42:27
TT BIN$lXPP0Tim6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:44:47
ZHOU BIN$lXPP0Tiw6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:45:10
SQL> create table ttt as select * from sys.obj$;
SQL> alter session set recyclebin=off;
SQL> drop table ttt;
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T BIN$lXPP0Tic6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:42:27
TT BIN$lXPP0Tim6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:44:47
ZHOU BIN$lXPP0Tiw6k/gQBCsyAR3gg==$0 TABLE 2010-11-20:11:45:10
[/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值