一些好玩的现象:
1、谁说同一个用户下面不能有两个表是同名的,看看下面,O(∩_∩)O哈哈~:
[oracle@lunar ~]$ ss SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 3 14:17:47 2015 Copyright (c) 1982, 2011, Oracle. All rights reserved. Welcome Lunar's oracle world! Love you , baby ! Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning and Real Application Testing options ERROR: ORA-22303: type "SYS"."DBMSOUTPUT_LINESARRAY" not found ORA-00942: table or view does not exist ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_OUTPUT" ORA-06512: at line 1 Session altered. Elapsed: 00:00:00.02 SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='LUNAR_BOOTSTRAP'; OWNER SEGMENT_NAME HEADER_FILE HEADER_BLOCK ------------------------------ -------------------------------------------------- ----------- ------------ SYS LUNAR_BOOTSTRAP 1 520 SYS LUNAR_BOOTSTRAP 4 434 Elapsed: 00:00:00.20 SYS@lunarp>
2、再看下面,我的库没有引导表了,O(∩_∩)O哈哈~:
SYS@lunarp>select object_id,object_name from dba_objects where object_name='%BOOTSTRAP%'; no rows selected Elapsed: 00:00:00.15 SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='%BOOTSTRAP%'; no rows selected Elapsed: 00:00:00.15 SYS@lunarp>select owner,segment_name from dba_segments where SEGMENT_NAME like '%BOOTSTRAP%'; OWNER SEGMENT_NAME ------------------------------ --------------------------------------------------------------------------------- SYSMAN MGMT_RT_BOOTSTRAP_TIMES SYSMAN MGMT_RT_BOOTSTRAP_TIMES_PK Elapsed: 00:00:00.21 SYS@lunarp>
3、看这里,表名区分大小写了,你知道为什么么?——— O(∩_∩)O哈哈~:
SYS@lunarp>select dbms_rowid.rowid_relative_fno(rowid) file#, 2 dbms_rowid.rowid_block_number(rowid) blk# 3 from BOOTSTRAP$; from BOOTSTRAP$ * ERROR at line 3: ORA-00942: table or view does not exist Elapsed: 00:00:00.00 SYS@lunarp>select dbms_rowid.rowid_relative_fno(rowid) file#, 2 dbms_rowid.rowid_block_number(rowid) blk# 3 from bootstrap$; FILE# BLK# ---------- ---------- 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 521 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 522 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 1 523 60 rows selected. Elapsed: 00:00:00.13 SYS@lunarp>
4、你知道这是为什么么?————很好猜,O(∩_∩)O哈哈~
SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='LUNAR_BOOTSTRAP'; OWNER SEGMENT_NAME HEADER_FILE HEADER_BLOCK ------------------------------ -------------------------------------------------- ----------- ------------ SYS LUNAR_BOOTSTRAP 1 520 SYS LUNAR_BOOTSTRAP 4 434 Elapsed: 00:00:00.15 SYS@lunarp>select obj#,name from obj$ where name like '%BOOTSTRAP%'; OBJ# NAME ---------- ------------------------------ 16077 IP_BOOTSTRAP_PRIMARY_KEY 16078 IP_DIST_BOOTSTRAP_PRIMARY_KEY 15554 MGMT_RT_BOOTSTRAP_TIMES 16072 MGMT_RT_BOOTSTRAP_TIMES_PK 15563 MGMT_RT_DOMAIN_BOOTSTRAP 15566 MGMT_RT_DOMAIN_DIST_BOOTSTRAP 16075 DOMAIN_BOOTSTRAP_PRIMARY_KEY 15569 MGMT_RT_IP_BOOTSTRAP 15572 MGMT_RT_IP_DIST_BOOTSTRAP 15557 MGMT_RT_URL_BOOTSTRAP 15560 MGMT_RT_URL_DIST_BOOTSTRAP 16073 URL_BOOTSTRAP_PRIMARY_KEY 16074 URL_DIST_BOOTSTRAP_PRIMARY_KEY 13 rows selected. Elapsed: 00:00:00.01 SYS@lunarp>
5、被删除的表名被占用了,不能重用,这是为什么?
这是整个玩耍过程中,最郁闷的问题了………………………………
SYS@lunarp>drop table lunar_bootstrap purge ; Table dropped. Elapsed: 00:00:01.19 SYS@lunarp>create table lunar_bootstrap tablespace system as select * from bootstrap$ ; create table lunar_bootstrap tablespace system as select * from bootstrap$ * ERROR at line 1: ORA-00955: name is already used by an existing object Elapsed: 00:00:00.06 SYS@lunarp>col segment_name for a30 SYS@lunarp>select owner,segment_name,segment_type,extent_id,file_id,block_id from DBA_EXTENTS where segment_name like 'BOOTSTRAP$'; no rows selected Elapsed: 00:00:00.34 SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='%BOOTSTRAP%'; no rows selected Elapsed: 00:00:00.09 SYS@lunarp>select owner,segment_name from dba_segments where SEGMENT_NAME like '%BOOTSTRAP%'; OWNER SEGMENT_NAME ------------------------------ ------------------------------ SYS LUNAR_BOOTSTRAP SYSMAN MGMT_RT_BOOTSTRAP_TIMES SYSMAN MGMT_RT_BOOTSTRAP_TIMES_PK Elapsed: 00:00:00.13 SYS@lunarp>select object_id,object_name from dba_objects where object_name='%BOOTSTRAP%'; no rows selected Elapsed: 00:00:00.14 SYS@lunarp>
好了,不玩了,还原回来了,O(∩_∩)O哈哈~:
SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='BOOTSTRAP$'; OWNER SEGMENT_NAME HEADER_FILE HEADER_BLOCK ------------------------------ --------------------------------------------------------------------------------- ----------- ------------ SYS BOOTSTRAP$ 1 520 Elapsed: 00:00:00.15 SYS@lunarp>select owner,segment_name,HEADER_FILE,HEADER_BLOCK from dba_segments where SEGMENT_NAME='LUNAR_BOOTSTRAP'; OWNER SEGMENT_NAME HEADER_FILE HEADER_BLOCK ------------------------------ --------------------------------------------------------------------------------- ----------- ------------ SYS LUNAR_BOOTSTRAP 4 434 Elapsed: 00:00:00.02 SYS@lunarp>