purge recyclebin之后dba_segments仍然有BIN$段
现象:
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$段的更多相关文章
- Oracle 手工清除回滚段的几种方法
关于回滚段的问题,之前也小整理过一个,参考: Current online Redo 和 Undo 损坏的处理方法 http://blog.csdn.net/tianlesoftware/articl ...
- oracle drop table and purge
一.drop表 执行drop table xx 语句 drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 通过查询回收站 ...
- 【转】Oracle回收站(recyclebin)
我们都比较熟悉windows中的回收站,文件删除后放到回收站里还可以再复原.Oracle回收站的原理完全一样,只是实现的细节方面有些差异.另外回收站中只能回收表和相关的对象包括索引.约束.触发器.嵌套 ...
- 一个purge参数引发的惨案——从线上hbase数据被删事故说起
在写这篇blog前,我的心情久久不能平静,虽然明白运维工作如履薄冰,但没有料到这么一个细小的疏漏会带来如此严重的灾难.这是一起其他公司误用puppet参数引发的事故,而且这个参数我也曾被“坑过”. ...
- DROP TABLE ** CASCADE CONSTRAINTS PURGE删除表的时候级联删除从表外键
1.关于 cascade constraints 假设A为主表(既含有某一主键的表),B为从表(即引用了A的主键作为外键). 则当删除A表时,如不特殊说明,则 drop table A 系统会出现错误 ...
- Oracle10g 回收站及彻底删除table : drop table xx purge
drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 1.通过查询回收站user_recyclebin获取被删除的表信息, ...
- oracle Recyclebin
每个用户都有自己的Recycle Bin.删除的对象不会永久存储在Recycle Bin中,Oracle会按照一定的规则自动清除里面的内容,如没有足够的空间.执行show recyclebin时只列出 ...
- oracle recyclebin详解(闪回删除的表)
今天在SOA应用数据库上运用DBMS_REDEFITION包进行在线非分区表转换分区表操作时,本想DROP掉建的临时表cube_scope_temp不小心后面忘记加"temp"直接 ...
- ORACLE Recyclebin管理及flashback recyclebin中的对象
Flashback用于恢复用户误删除的对象(包括表,索引等), 不支持sys用户. system表空间下的对象,也不能从回收站里拿到.故使用SYS 或者SYSTEM用户登陆时, show recycl ...
随机推荐
- 解决android有的手机拍照后上传图片被旋转的问题
转至 http://blog.csdn.net/walker02/article/details/8211628 需求:做仿新浪发微博的项目,能够上传图片还有两外一个项目用到手机拍摄图片,这两个都需要 ...
- android项目引入三方类库配置文件
android项目中可能会用到诸多外部的三方库,如**.jar或者引用第三个项目,那么它们引用的这些东西都放在哪里呢?我们来看下. 如果引入的是三方的jar包,我们默认的是放在了libs文件夹下,然后 ...
- sublime3 docblocker插件定制自己的注释,配置步骤
DocBlockr很好用,不仅仅可以自动生成注释,还可以手动编辑注释的格式. 安装方法: Cmd+Shift+P -> Install Package -> docblockr wi ...
- 基于HBase Hadoop 分布式集群环境下的MapReduce程序开发
HBase分布式集群环境搭建成功后,连续4.5天实验客户端Map/Reduce程序开发,这方面的代码网上多得是,写个测试代码非常容易,可是真正运行起来可说是历经挫折.下面就是我最终调通并让程序在集群上 ...
- 微信支付id出现的重复支付解决方法和app应用中多种支付方式之间的对比
1.微信支付的transId发起支付请求,未登录微信,先帐号登陆,否则直接去支付.这样的话,该transId跟该帐号绑定起来了, 如果下一次再重新使用该transId来支付请求,但是想切换其他的微信帐 ...
- 【2018年12月14日】A股最便宜的股票
新钢股份(SH600782) - 当前便宜指数:193.12 - 滚动扣非市盈率PE:2.91 - 动态市净率PB:0.96 - 动态年化股息收益率:1.75% - 新钢股份(SH600782)的历史 ...
- node.js--Less
摘要: 现在已经有许多站点使用Node.js,所以在Node.js上配置Less环境也是很重要的,下面分享下如何在Node上使用Less开发,前提是你电脑上已经安装node. 安装: 只需要执行下面一 ...
- python日志,支持彩色打印和文件大小切片写入和写入mongodb
1.项目中使用了自定义的ColorHandler和MongoHandler,使用了内置的RotatingFileHandler和三方库的ConcurrentRotatingFileHandler. 支 ...
- 微信公众号支付-Common
using System.Web; /// <summary> /// 公共帮助类 /// </summary> public class Common { private H ...
- Matlab 随机数字
1.随机生成仅仅有0.1元素的矩阵(m行n列) A=round(rand(m,n)) 2.随机生成每行有若干个0,1元素的矩阵,比方每行仅仅有2个元素为1,其它元素为0 A=zeros(4,5) fo ...