本文标题:RECYCLEBIN功能的控制【本站如从外站转载,会注明出处】
本文链接:http://www.validba.net/2009/02/recyclebin%e5%8a%9f%e8%83%bd%e7%9a%84%e6%8e%a7%e5%88%b6/
10G提供了类似windows回收站的新功能, 暂时存储删除的对象.recyclebin对删除对象的保护时间跟系统的活动有关系.这个功能在数据库创建完之后是默认打开的,是FLASHBACK TABLE …TO BEFORE DROP的保证。可以通过一个参数控制是否启用recyclebin技术.这个参数在10G R1中是个隐含的:
[oracle@neworacle oracle]$ sqlplus / as sysdba
SQL*Plus: Release 10.1.0.5.0 – Production on Wed May 7 15:37:32 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 – Production
With the Partitioning and Data Mining options
SQL>
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 – Production
With the Partitioning and Data Mining options
SQL>
SQL> col ksppinm format a30
SQL> col ksppstvl format a30
SQL> Select Ksppinm,
Ksppstvl
From X$ksppi
Join X$ksppcv
Using (Indx)
Where Ksppinm Like ‘_recycle%’
Order By Ksppinm; 2 3 4 5 6 7
SQL> col ksppstvl format a30
SQL> Select Ksppinm,
Ksppstvl
From X$ksppi
Join X$ksppcv
Using (Indx)
Where Ksppinm Like ‘_recycle%’
Order By Ksppinm; 2 3 4 5 6 7
KSPPINM KSPPSTVL
—————————— ——————————
_recyclebin TRUE
—————————— ——————————
_recyclebin TRUE
而在10GR2中ORACLE将这个参数公布了, 也就是oracle提供了让我们明确启用或禁止recycylebin的功能.
[oracle@mayp data]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 – Production on Wed May 7 07:39:13 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
USER:sys@SID:MAYP>show parameter recyclebin
NAME TYPE VALUE
———————————— ———– ——————————
recyclebin string on
———————————— ———– ——————————
recyclebin string on
USER:sys@SID:MAYP>
调整此参数需要谨慎.

CopyRight Validba'S Home 版权所有.本站为个人学习之用,评论时请遵守本国法律