现象:
purge recyclebin之后dba_segments仍然有BIN$段。

如下,执行了purge recyclebin之后:

SQL> select segment_name,SEGMENT_TYPE from dba_segments where tablespace_name like 'USERS' and owner='ZHOU186'

 2 ;

SEGMENT_NAME SEGMENT_TYPE

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

BIN$xd87Y+adofPgQAB/AQB9yA==$0 TABLE

BIN$xd87Y+acofPgQAB/AQB9yA==$0 TABLE

ZHOU_WORK_UNITE_??? TABLE

ZHOU_WORK_UNITE_??? TABLE

ZHOU_WORK_UNITE_?? TABLE

BIN$0QhC65ubuMzgQAB/AQBaBg==$0 TABLE

ZHOU_WORK_UNITE_??? TABLE

ZHOU_WORK_UNITE_??? TABLE

BIN$wJ9k2G65qpDgQAB/AQAj+g==$0 TABLE

ZHOU_WORK_UNITE_??? TABLE

BIN$0QhC65uauMzgQAB/AQBaBg==$0 TABLE

ZHOU_WORK_UNITE_??? TABLE

BIN$0QhC65uduMzgQAB/AQBaBg==$0 TABLE

BIN$0QhC65ucuMzgQAB/AQBaBg==$0 TABLE

SQL> desc ZHOU186."BIN$xd87Y+adofPgQAB/AQB9yA==$0";

 Name Null? Type

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

 BEGIN_DATE VARCHAR2(10)

 BEGIN_TIME VARCHAR2(10)

 END_DATE VARCHAR2(10)

 END_TIME VARCHAR2(10)

 POSITION1 VARCHAR2(30)

 PRG_NUM VARCHAR2(30)

 WORK_TIME FLOAT(126)

 FIRST_CHECK NUMBER(38)

 PERSON_NUMBER VARCHAR2(20)

 JOB_BIN VARCHAR2(20)

 JOB_BINNUMBER NUMBER(38)

分析:

客户的操作步骤大致是:

[oracle@MESZHOUDB ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 16 09:55:40 2013

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

SQL> alter session set current_schema=ZHOU186;            <====注意到是set current_schema,并不是直接登录进来

Session altered.

SQL> purge recyclebin;

Recyclebin purged.

SQL>

SQL>

SQL> select segment_name from dba_segments where tablespace_name like 'USERS' and owner='ZHOU186'

 2 ;

SEGMENT_NAME

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

BIN$xd87Y+adofPgQAB/AQB9yA==$0

BIN$xd87Y+acofPgQAB/AQB9yA==$0

ZHOU_WORK_UNITE_???

ZHOU_WORK_UNITE_???

ZHOU_WORK_UNITE_??

BIN$0QhC65ubuMzgQAB/AQBaBg==$0

ZHOU_WORK_UNITE_???

ZHOU_WORK_UNITE_???

BIN$wJ9k2G65qpDgQAB/AQAj+g==$0

ZHOU_WORK_UNITE_???

BIN$0QhC65uauMzgQAB/AQBaBg==$0

SEGMENT_NAME

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

ZHOU_WORK_UNITE_???

BIN$0QhC65uduMzgQAB/AQBaBg==$0

BIN$0QhC65ucuMzgQAB/AQBaBg==$0

BIN$0QhC65ueuMzgQAB/AQBaBg==$0

ZHOU_WORK_UNITE_???

BIN$w2uuBw1tJa/gQAB/AQB7Eg==$0

BIN$w2uuBw1sJa/gQAB/AQB7Eg==$0

BIN$w2uuBw1uJa/gQAB/AQB7Eg==$0

BIN$w2uuBw1vJa/gQAB/AQB7Eg==$0

Oracle文档的说明:

The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema.

This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name. This setting changes the current schema, but it does not change the session user or the current user, nor does it give the session user any additional system or object privileges for the session.

For example:

The table "T1" is owned by user "TEST" and user "SCOTT" doesn't have a table named "T1":

SQL>CONNECT TEST/TEST

SQL>GRANT SELECT ON T1 TO SCOTT;

SQL>CONNECT scott/tiger

SQL>SELECT * FROM SCOTT.T1; <<<<< you must specify the table prefix "SCOTT."

SQL>ALTER SESSION SET CURRENT_SCHEMA = test;

SQL>SELECT * FROM T1; <<<<< Now you need not to add the prefix "SCOTT."

After the session set CURRENT_SCHEMA = test, the only change is that the user "SCOTT" can access the table "TEST.T1" without specifying the table prefix.

The current user is still "TEST", This time when you perform a "purge recyclebin", it just purges the recyclebin in user "TEST", not "SCOTT".

For more details, please refer to:

Oracle? Database SQL Reference

10g Release 2 (10.2)

B14200-02

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_2012.htm#SQLRF00901

一句话总结:都是基本概念没过关,很多事情想当然的去理解,Oracle文档还是值得很多人细细的读。

purge recyclebin之后dba_segments仍然有BIN$段的更多相关文章

  1. Oracle 手工清除回滚段的几种方法

    关于回滚段的问题,之前也小整理过一个,参考: Current online Redo 和 Undo 损坏的处理方法 http://blog.csdn.net/tianlesoftware/articl ...

  2. oracle drop table and purge

    一.drop表 执行drop table xx 语句 drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 通过查询回收站 ...

  3. 【转】Oracle回收站(recyclebin)

    我们都比较熟悉windows中的回收站,文件删除后放到回收站里还可以再复原.Oracle回收站的原理完全一样,只是实现的细节方面有些差异.另外回收站中只能回收表和相关的对象包括索引.约束.触发器.嵌套 ...

  4. 一个purge参数引发的惨案——从线上hbase数据被删事故说起

    在写这篇blog前,我的心情久久不能平静,虽然明白运维工作如履薄冰,但没有料到这么一个细小的疏漏会带来如此严重的灾难.这是一起其他公司误用puppet参数引发的事故,而且这个参数我也曾被“坑过”.   ...

  5. DROP TABLE ** CASCADE CONSTRAINTS PURGE删除表的时候级联删除从表外键

    1.关于 cascade constraints 假设A为主表(既含有某一主键的表),B为从表(即引用了A的主键作为外键). 则当删除A表时,如不特殊说明,则 drop table A 系统会出现错误 ...

  6. Oracle10g 回收站及彻底删除table : drop table xx purge

    drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 1.通过查询回收站user_recyclebin获取被删除的表信息, ...

  7. oracle Recyclebin

    每个用户都有自己的Recycle Bin.删除的对象不会永久存储在Recycle Bin中,Oracle会按照一定的规则自动清除里面的内容,如没有足够的空间.执行show recyclebin时只列出 ...

  8. oracle recyclebin详解(闪回删除的表)

    今天在SOA应用数据库上运用DBMS_REDEFITION包进行在线非分区表转换分区表操作时,本想DROP掉建的临时表cube_scope_temp不小心后面忘记加"temp"直接 ...

  9. ORACLE Recyclebin管理及flashback recyclebin中的对象

    Flashback用于恢复用户误删除的对象(包括表,索引等), 不支持sys用户. system表空间下的对象,也不能从回收站里拿到.故使用SYS 或者SYSTEM用户登陆时, show recycl ...

随机推荐

  1. Python 中 __all__ 的作用

    1.测试文件foo.py # -*- coding: utf-8 -*- # import sys # reload(sys) # sys.setdefaultencoding('gbk') __al ...

  2. python_django_sae入口配置

    --index.wsgi import sys import os.path os.environ['DJANGO_SETTINGS_MODULE'] = 'APPNAME.settings' sys ...

  3. 联想服务器X3850 X6 配置RAID5

    实验环境: 1.  服务器型号 联想 System X3850 X6 2.  四块300G  SAS硬盘 实验目的: 配置RAID 5 ,搭建公司重要文件共享服务器使用. 标注:本教程四块硬盘全做RA ...

  4. 多个IoC容器适配器设计及性能测试(Castle.Windsor Autofac Spring.Core)

    [转]多个IoC容器适配器设计及性能测试和容器选择 1. 采用的IoC容器和版本 Autofac.2.6.3.862 Castle.Windsor.3.1.0 Spring.Core.2.0.0 2. ...

  5. php-fpm的pool php-fpm慢执行日志 open_basedir php-fpm进程管理

    php-fpm的pool • vim /usr/local/php/etc/php-fpm.conf//在[global]部分增加 • include = etc/php-fpm.d/*.conf • ...

  6. jmm 和线程安全

    Java的内存模型JMM Java的内存模型JMM(Java Memory Model)JMM主要是为了规定了线程和内存之间的一些关系.根据JMM的设计,系统存在一个主内存(Main Memory), ...

  7. 【转帖】如何在redhat单机服务器上运行postgresql的多个实例(howto run multiple postgresql instance on one redhat server)

    Running multiple PostgreSQL 9.2 Instances on one server in CentOS 6/RHEL 6/Fedora 原帖网站速度很慢,故转帖在此 Thi ...

  8. Java学习之——Java Serializable

    1.什么是Serializable接口? http://en.wikipedia.org/wiki/Serialization Java 提供了一种对象序列化的机制,该机制中,一个对象可以被表示为一个 ...

  9. input框取消光标颜色手机端不生效

    <style> input{ color:transparent; } </style> <input value="我要隐藏光标"> //文字 ...

  10. 利用flask将opencv实时视频流输出到浏览器

    opencv通过webcam可以获取本地实时视频流,但是如果需要将视频流共享给其他机器调用,就可以将利用flask框架构建一个实时视频流服务器,然后其他机器可以通过向这个服务器发送请求来获取这台机器上 ...