- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2013-6-4 08:12:44
INSTANCE_NAME
----------------
MACDBN
SQL>
SQL>
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL>
SQL> create table maclean(t1 int ,t2 varchar2(20));
Table created.
SQL> insert into maclean values (1,'ABC');
1 row created.
SQL> /
1 row created.
SQL> commit;
Commit complete.
SQL> select * from maclean;
T1 T2
---------- --------------------
1 ABC
1 ABC
SQL> /
T1 T2
---------- --------------------
1 ABC
1 ABC
SQL> insert into maclean values(3,'ABC');
1 row created.
session B:
SQL> exec dbms_stats.gather_table_stats(user,'MACLEAN');
PL/SQL procedure successfully completed.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
2012825
SQL> select * from maclean;
T1 T2
---------- --------------------
1 ABC
1 ABC
Execution Plan
----------------------------------------------------------
Plan hash value: 2568761675
-----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 2 | 14 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| MACLEAN | 2 | 14 | 2 (0)| 00:00:01 |
-----------------------------------------------------------------------------
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
6 consistent gets
0 physical reads
108 redo size
654 bytes sent via SQL*Net to client
523 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2 rows processed
SQL> commit;
Commit complete.
SQL> alter system dump logfile '+DATA/macdb/onlinelog/group_1.269.816597463';
System altered.
SQL> SQL>
SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/s01/diag/rdbms/macdbn/MACDBN/trace/MACDBN_ora_7310.trc
2012825==>1EB699 大于scn 1EB699的是相关redo
SQL> select name from obj$ where obj#=77452;
NAME
------------------------------
MACLEAN
OP:4.1
REDO RECORD - Thread:1 RBA: 0x00003b.00004c01.0010 LEN: 0x006c VLD: 0x05
SCN: 0x0000.001eb69c SUBSCN: 1 06/05/2013 08:47:34
(LWN RBA: 0x00003b.00004c01.0010 LEN: 0001 NST: 0001 SCN: 0x0000.001eb69c)
CHANGE #1 TYP:0 CLS:1 AFN:1 DBA:0x00415fd1 OBJ:77452 SCN:0x0000.001e9cf7 SEQ:1 OP:4.1 ENC:0 RBL:0
Block cleanout record, scn: 0x0000.001eb69c ver: 0x01 opt: 0x01, entries follow...
REDO RECORD - Thread:1 RBA: 0x00003b.00004c05.0010 LEN: 0x006c VLD: 0x05
SCN: 0x0000.001eb6a1 SUBSCN: 1 06/05/2013 08:47:39
(LWN RBA: 0x00003b.00004c05.0010 LEN: 0001 NST: 0001 SCN: 0x0000.001eb6a1)
CHANGE #1 TYP:0 CLS:1 AFN:1 DBA:0x00415fd1 OBJ:77452 SCN:0x0000.001eb69c SEQ:1 OP:4.1 ENC:0 RBL:0
Block cleanout record, scn: 0x0000.001eb6a1 ver: 0x01 opt: 0x01, entries follow...
OP:4.1 是 Transaction Block-Block Cleanout
Layer 4 : Transaction Block
Opcode 1 : Block Cleanout
Opcode 2 : Physical Cleanout
Opcode 3 : Single Array Change
Opcode 4 : Multiple Changes to an Array
Opcode 5 : Format Block
|
|