内容字号:默认大号超大号

段落设置:段首缩进取消段首缩进

字体设置:切换到微软雅黑切换到宋体

跟踪Oracle启动状态

2017-03-13 12:26 出处:电脑高手网整理 人气: 评论(0

  可以使用10046 event来跟踪

?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[[email protected] ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 20 19:48:00 2013
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
Connected to an idle instance.
 
SQL> startup mount
ORACLE instance started.
 
Total System Global Area  835104768 bytes
Fixed Size                  2257840 bytes
Variable Size             717229136 bytes
Database Buffers          113246208 bytes
Redo Buffers                2371584 bytes
Database mounted.
SQL> oradebug setmypid
Statement processed.
SQL> alter session set events '10046 trace name context forever,level 12';
 
Session altered.
 
SQL> alter database open;
 
Database altered.
 
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/oraprod/oraprod/trace/oraprod_ora_2820.trc
SQL> alter session set events '10046 trace name context off';
 
Session altered.
 
SQL>

?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
WAIT #140190090045240: nam='db file sequential read' ela= 460 file#=1 block#=520 blocks=1 obj#=-1 tim=1387540363264254
=====================
PARSING IN CURSOR #140190090037016 len=188 dep=1 uid=0 oct=1 lid=0 tim=1387540363332140 hv=4006182593 ad='91871900' sqlid='32r4f1brckzq1'
create table bootstrap$ (
END OF STMT
PARSE #140190090037016:c=9000,e=67806,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim
=1387540363332139
EXEC #140190090037016:c=0,e=17461,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1387540363349678
CLOSE #140190090037016:c=0,e=3,dep=1,type=0,tim=1387540363349760
=====================
PARSING IN CURSOR #140190090037016 len=55 dep=1 uid=0 oct=3 lid=0 tim=1387540363350500 hv=2111436465 ad='9185fc98' sqlid='6apq2rjyxmxpj'
select line#, sql_text from bootstrap$ where obj# != :1
END OF STMT
PARSE #140190090037016:c=999,e=710,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1387540363350482
 
*** 2013-12-20 19:52:43.430
BINDS #140190090037016:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7f808c8482d0  bln=22  avl=02  flg=05 
  value=59
EXEC #140190090037016:c=2000,e=116005,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=867914364,tim
=1387540363466571
WAIT #140190090037016: nam='db file sequential read' ela= 24 file#=1 block#=520 blocks=1 obj#=59 tim=1387540363466681

  可以看到是加载BOOTSTRAP$表

?

1
2
3
4
5
6
7
8
9
10
11
12
SQL> select dbms_metadata.get_ddl('TABLE','BOOTSTRAP$','SYS') from dual;
 
  CREATE TABLE "SYS"."BOOTSTRAP$"
   (    "LINE#" NUMBER NOT NULL ENABLE,
        "OBJ#" NUMBER NOT NULL ENABLE,
        "SQL_TEXT" VARCHAR2(4000) NOT NULL ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 57344 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM"

?

1
2
3
4
5
SQL> select owner,OBJECT_ID from dba_objects where object_name=upper('bootstrap$');
 
OWNER                           OBJECT_ID
------------------------------ ----------
SYS                                    59

相关栏目

相关文章



分享给小伙伴们:

评论

发表评论愿您的每句评论,都能给大家的生活添色彩,带来共鸣,带来思索,带来快乐。

签名: 验证码: 点击我更换图片

评论列表

    Copyright © 2002-2016 dngsw.cn 电脑高手网 版权所有

    粤ICP备13005586号-3