oracle purge dba_recyclebin,How to purge recyclebin?

>

I selected segments in our Tablespace as :

SQL> select segment_name,segment_type from dba_segments where tablespace_name='M

DMTS_02';

SEGMENT_NAME SEGMENT_TYPE

------------------------------ ------------------

D1_MSRMT_BAK TABLE

D1_MSRMT TABLE

BIN$ljNJJajlQrmlKzwWb7OcYA==$0 INDEX

BIN$c+5EGn8gTlelgM1FfaHDRw==$0 INDEX

BIN$CqgNXgIRT/uQGVMbnSa+kQ==$0 INDEX

Then

SQL> PURGE DBA_RECYCLEBIN;

DBA Recyclebin purged.

But the recyclebin is not cleared

>

How would you know? You are not querying the recycle bin with those queries; you are querying dba_segments.

If you want to know what is in the recycle bin you have to query the recycle bin.

>

Viewing and Querying Objects in the Recycle Bin

Oracle Database provides two views for obtaining information about objects in the recycle bin:

View Description

USER_RECYCLEBIN This view can be used by users to see their own dropped objects in the recycle bin. It has a synonym RECYCLEBIN, for ease of use.

DBA_RECYCLEBIN This view gives administrators visibility to all dropped objects in the recycle bin

>

Just because an object name begins with BIN$ doesn't mean that object is in the recycle bin. It just means that at one point it was in the recycle bin.

Those objects you displayed are INDEXes.

>

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 if you want to restore their original names.

>

See Using Flashback Drop and Managing the Recycle Bin in the DBA Guide

http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables011.htm

>

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 if you want 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值