控制文件与数据库初始化
控制文件是数据库大脑,system表空间是数据库的心脏
SQL> alter session set events 'immediate trace name controlf level 8';
成都创新互联主要从事成都网站设计、成都网站制作、外贸网站建设、网页设计、企业做网站、公司建网站等业务。立足成都服务梅里斯,十余年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:13518219792
Session altered.
SQL> select value from v$diag_info where name='Default Trace File';
VALUE
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_26792.
trc
V10 STYLE FILE HEADER:
Compatibility Vsn = 203423744=0xc200000
Db ID=1779551310=0x6a11cc4e, Db Name='NEWTEST'
Activation ID=0=0x0
Control Seq=100581=0x188e5, File size=1142=0x476
File Number=0, Blksiz=16384, File Type=1 CONTROL
DATABASE ENTRY
(size = 316, compat size = 316, section max = 1, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 1, numrecs = 1)
12/13/2017 17:22:22
DB Name "NEWTEST"
Database flags = 0x00404001 0x00001200 0x00000082
Controlfile Creation Timestamp 12/13/2017 17:22:22
Incmplt recovery scn: 0x0000000000000000
Resetlogs scn: 0x000000000016be96 Resetlogs Timestamp 12/13/2017 17:22:26
Prior resetlogs scn: 0x0000000000000001 Prior resetlogs Timestamp 03/08/2017 15:57:31
Redo Version: compatible=0xc200000
#Data files = 15, #Online files = 4
Database checkpoint: Thread=1 scn: 0x00000000003d70ff
Threads: #Enabled=1, #Open=1, Head=1, Tail=1
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
.......
00000000 00000000 00000000 00000000 00000000 00000000
Max log members = 3, Max data members = 1
Arch list: Head=1, Tail=1, Force scn: 0x00000000003bc204scn: 0x0000000000000000
Activation ID: 1779519566
SCN compatibility 1
Auto-rollover enabled
Controlfile Checkpointed at scn: 0x00000000003d7154 01/06/2018 09:38:26
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
.........
CHECKPOINT PROGRESS RECORDS
(size = 8180, compat size = 8180, section max = 11, section in-use = 0,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 2, numrecs = 11)
THREAD #1 - status:0x2 flags:0x0 dirty:433
low cache rba:(0x40.39a7c.0) on disk rba:(0x40.3a257.0)
on disk scn: 0x00000000003d757c 01/06/2018 09:39:55
resetlogs scn: 0x000000000016be96 12/13/2017 17:22:26
heartbeat: 964733991 mount id: 1781596289
THREAD #2 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #3 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #4 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #5 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #6 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #7 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
THREAD #8 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000000000000000 01/01/1988 00:00:00
resetlogs scn: 0x0000000000000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
SQL> select dbms_flashback.get_system_change_number() from dual;
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER()
4033277
SQL> select max(ktuxescnw * power(2,32) + ktuxescnb) SCN from x$ktuxe;
SCN
4033795
SQL> select current_scn from v$database;
CURRENT_SCN
4033950
SQL> oradebug setmypid
Statement processed.
SQL> oradebug DUMPvar SGA kcsgscn
kcslf kcsgscn [7FF743D2C400, 7FF743D2C430) = 003D8DB8 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 43D2BE80 00007FF7
SQL> select to_number('3D8DB8','xxxxxx') SCN from dual;
SCN
4033976
以上四种方法都可以得到SCN号的信息,经测试第二种不是精确的SCN号,而通过其他三种获得的SCN号是相同的,可以任选一种进行查询
DATA FILE #1:
name #6: C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\SYSTEM01.DBF
creation size=0 block size=8192 status=0xe flg=0x1 head=6 tail=6 dup=1
pdb_id 1, tablespace 0, index=2 krfil=1 prev_file_in_ts=0 prev_file_in_pdb=5
unrecoverable scn: 0x0000000000000000 01/01/1988 00:00:00
Checkpoint cnt:126 scn: 0x00000000003d70ff 01/06/2018 09:38:14
Stop scn: 0xffffffffffffffff 01/05/2018 15:43:54
Creation Checkpointed at scn: 0x0000000000000007 03/08/2017 15:57:36
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
......
SQL> alter session set events 'immediate trace name file_hdrs level 10';
Session altered.
SQL> run
1 SELECT d.VALUE
2 || '\'
3 || LOWER (RTRIM (i.INSTANCE, CHR (0)))
4 || 'ora'
5 || p.spid
6 || '.trc' trace_file_name
7 FROM (SELECT p.spid
8 FROM v$mystat m, v$session s, v$process p
9 WHERE m.statistic# = 1 AND s.SID = m.SID AND p.addr = s.paddr) p,
10 (SELECT t.INSTANCE
11 FROM v$thread t, v$parameter v
12 WHERE v.NAME = 'thread'
13 AND (v.VALUE = 0 OR t.thread# = TO_NUMBER (v.VALUE))) i,
14 (SELECT VALUE
15 FROM v$parameter
16* WHERE NAME = 'user_dump_dest') d
TRACE_FILE_NAME
C:\APP\ADMINISTRATOR\VIRTUAL\PRODUCT\12.2.0\DBHOME_2\RDBMS\TRACE\newtest_ora_275
08.trc
12c
SQL> SELECT d.VALUE
2 || '\'
3 || LOWER (RTRIM (i.INSTANCE, CHR (0)))
4 || 'ora'
5 || p.spid
6 || '.trc' trace_file_name
7 FROM (SELECT p.spid
8 FROM v$mystat m, v$session s, v$process p
9 WHERE m.statistic# = 1 AND s.SID = m.SID AND p.addr = s.paddr) p,
10 (SELECT t.INSTANCE
11 FROM v$thread t, v$parameter v
12 WHERE v.NAME = 'thread'
13 AND (v.VALUE = 0 OR t.thread# = TO_NUMBER (v.VALUE))) i,
14 (SELECT VALUE
15 FROM v$diag_info
16 where name='Diag Trace') d
17 /
TRACE_FILE_NAME
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_27508.
trc
linux下2行应为/
DATA FILE #1:
name #6: C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\SYSTEM01.DBF
creation size=0 block size=8192 status=0xe flg=0x1 head=6 tail=6 dup=1
pdb_id 1, tablespace 0, index=2 krfil=1 prev_file_in_ts=0 prev_file_in_pdb=5
unrecoverable scn: 0x0000000000000000 01/01/1988 00:00:00
Checkpoint cnt:126 scn: 0x00000000003d70ff 01/06/2018 09:38:14
Stop scn: 0xffffffffffffffff 01/05/2018 15:43:54
Creation Checkpointed at scn: 0x0000000000000007 03/08/2017 15:57:36
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
....
V10 STYLE FILE HEADER:
Compatibility Vsn = 203423744=0xc200000
Db ID=1779551310=0x6a11cc4e, Db Name='NEWTEST'
Activation ID=0=0x0
Control Seq=100575=0x188df, File size=107520=0x1a400
File Number=1, Blksiz=8192, File Type=3 DATA
Tablespace #0 - SYSTEM rel_fn:1
Creation at scn: 0x0000000000000007 03/08/2017 15:57:36
Backup taken at scn: 0x0000000000000000 01/01/1988 00:00:00 thread:0
reset logs count:0x3960cbd2 scn: 0x000000000016be96
prev reset logs count:0x37ea4deb scn: 0x0000000000000001
recovered at 12/13/2017 17:19:57
status:0x2004 root dba:0x00400208 chkpt cnt: 126 ctl cnt:125
begin-hot-backup file size: 0
Checkpointed at scn: 0x00000000003d70ff 01/06/2018 09:38:14
thread:1 rba:(0x40.39a7b.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
.....
SQL> select * from v$logfile;
GROUP# STATUS TYPE
MEMBER
IS_ CON_ID
3 ONLINE
C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\REDO03.LOG
NO 0
2 ONLINE
C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\REDO02.LOG
NO 0
GROUP# STATUS TYPE
MEMBER
IS_ CON_ID
1 ONLINE
C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\REDO01.LOG
NO 0
SQL> alter system dump logfile 'C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\REDO01.LOG';
System altered.
SQL> select value from v$diag_info where name ='Default Trace File';
VALUE
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_27508.
trc
SQL> select file#,checkpoint_change#,to_char(checkpoint_time,'yyyy-mm-dd hh34:mi:ss') cpt from v$datafile;
FILE# CHECKPOINT_CHANGE# CPT
1 4036768 2018-01-06 10:48:28
2 1525489 2017-12-13 17:40:33
3 4036768 2018-01-06 10:48:28
4 1525489 2017-12-13 17:40:33
5 4036768 2018-01-06 10:48:28
6 1525489 2017-12-13 17:40:33
7 4036768 2018-01-06 10:48:28
8 4020232 2018-01-04 09:44:54
9 4020232 2018-01-04 09:44:54
10 4020232 2018-01-04 09:44:54
11 4020232 2018-01-04 09:44:54
FILE# CHECKPOINT_CHANGE# CPT
40 4020233 2018-01-04 09:44:54
41 4020233 2018-01-04 09:44:54
42 4020233 2018-01-04 09:44:54
43 4020233 2018-01-04 09:44:54
15 rows selected.
SQL> select dbid,checkpoint_change# from v$database;
DBID CHECKPOINT_CHANGE#
1779551310 4036768
SQL> SELECT NAME,GETS,MISSES FROM V$LATCH WHERE NAME='checkpoint queue latch';
NAME GETS
MISSES
checkpoint queue latch 361534
0
SQL> col name format A25
SQL> SELECT NAME,GETS,MISSES FROM V$LATCH_CHILDREN WHERE NAME='checkpoint queue latch';
NAME GETS MISSES
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 190545 0
NAME GETS MISSES
checkpoint queue latch 191544 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
checkpoint queue latch 0 0
16 rows selected.
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
数据库装载完毕。
数据库已经打开。
SQL> alter system checkpoint;
系统已更改。
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
ORA-00214: ???? ''C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\CONTROL02.CTL''
?? 100969 ??? ''C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\CONTROL01.CTL'' ??
100952 ???
SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-01507: ??????
利用好的恢复control2
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
数据库装载完毕。
SQL> alter database open;
数据库已更改。
SQL> select * from v$version where rownum<2;
BANNER
CON_ID
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
0
SQL> select * from v$option where parameter='Fast-Start Fault Recovery';
PARAMETER
VALUE CON_ID
Fast-Start Fault Recovery
TRUE 0
SQL> show parameter fast_start_io
NAME TYPE VALUE
fast_start_io_target integer 0
SQL> show parameter interval
NAME TYPE VALUE
log_checkpoint_interval integer 0
SQL> select MTTR_TARGET_FOR_ESTIMATE MTTREST,
2 ADVICE_STATUS AD
3 ,DIRTY_LIMIT DL,
4 ESTD_CACHE_WRITES ESTCW,
5 ESTD_CACHE_WRITE_FACTOR ESTCWF,
6 ESTD_TOTAL_WRITES ESTCW,
7 ESTD_TOTAL_WRITE_FACTOR ESTWF,
8 ESTD_TOTAL_IOS ESTTI
9 FROM v$mttr_target_advice;
no rows selected
12C无值
SQL> show parameter statistics_level
NAME TYPE VALUE
statistics_level string TYPICAL
SQL> run
1 select STATISTICS_NAME,
2 DESCRIPTION
3 from v$statistics_level
4* where STATISTICS_NAME='MTTR Advice'
STATISTICS_NAME
DESCRIPTION
MTTR Advice
Predicts the impact of different MTTR settings on number of physical I/Os
SQL> select RECOVERY_ESTIMATED_IOS REIO,
2 ACTUAL_REDO_BLKS ARB,
3 TARGET_REDO_BLKS TRB,
4 LOG_FILE_SIZE_REDO_BLKS LFSRB,
5 LOG_CHKPT_TIMEOUT_REDO_BLKS LCTRB,
6 LOG_CHKPT_INTERVAL_REDO_BLKS LCIRB,
7 FAST_START_IO_TARGET_REDO_BLKS FSITRB,
8 TARGET_MTTR TMTTR,
9 ESTIMATED_MTTR EMTTR,
10 CKPT_BLOCK_WRITES CBW
11 from v$instance_recovery;
REIO ARB TRB LFSRB LCTRB LCIRB FSITRB
TMTTR EMTTR CBW
138 1180 36750 663552 36750
0 19 127181
SQL> /
REIO ARB TRB LFSRB LCTRB LCIRB FSITRB
TMTTR EMTTR CBW
1290 4393 18221 663552 18221
0 20 139920
SQL> show parameter fast_start_mttr_target
NAME TYPE VALUE
fast_start_mttr_target integer 0
2017-12-13T17:22:52.439170+08:00
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SQL> select name,value from v$sysstat where upper(name) like '%DBWR%'
2 ;
NAME VALUE
flash cache insert skip: DBWR overloaded 0
DBWR checkpoint buffers written 185696
DBWR thread checkpoint buffers written 0
DBWR tablespace checkpoint buffers written 0
DBWR parallel query checkpoint buffers written 0
DBWR object drop buffers written 1374
DBWR transaction table writes 3444
DBWR undo block writes 44355
DBWR revisited being-written buffer 0
DBWR lru scans 0
DBWR checkpoints 590
NAME VALUE
DBWR fusion writes 0
12 rows selected.
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup nomount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
SQL> alter database mount;
数据库已更改。
SQL> alter session set events 'immediate trace name controlf level 12';
会话已更改。
SQL> SELECT d.VALUE
2 || '\'
3 || LOWER (RTRIM (i.INSTANCE, CHR (0)))
4 || 'ora'
5 || p.spid
6 || '.trc' trace_file_name
7 FROM (SELECT p.spid
8 FROM v$mystat m, v$session s, v$process p
9 WHERE m.statistic# = 1 AND s.SID = m.SID AND p.addr = s.paddr) p,
10 (SELECT t.INSTANCE
11 FROM v$thread t, v$parameter v
12 WHERE v.NAME = 'thread'
13 AND (v.VALUE = 0 OR t.thread# = TO_NUMBER (v.VALUE))) i,
14 (SELECT VALUE
15 FROM v$diag_info
16 where name='Diag Trace') d
17 /
TRACE_FILE_NAME
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtestora27956.trc
SQL> select value from v$diag_info where name='Default Trace File';
VALUE
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_27956.trc
DATABASE ENTRY
(size = 316, compat size = 316, section max = 1, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 1, numrecs = 1)
12/13/2017 17:22:22
DB Name "NEWTEST"
Database flags = 0x00404001 0x00001000 0x00000082
Controlfile Creation Timestamp 12/13/2017 17:22:22
Incmplt recovery scn: 0x0000000000000000
Resetlogs scn: 0x000000000016be96 Resetlogs Timestamp 12/13/2017 17:22:26
Prior resetlogs scn: 0x0000000000000001 Prior resetlogs Timestamp 03/08/2017 15:57:31
Redo Version: compatible=0xc200000
#Data files = 15, #Online files = 4
Database checkpoint: Thread=1 scn: 0x0000000000406702
Threads: #Enabled=1, #Open=0, Head=0, Tail=0
Max log members = 3, Max data members = 1
Arch list: Head=3, Tail=3, Force scn: 0x00000000003ecbc4scn: 0x0000000000000000
Activation ID: 1779519566
SCN compatibility 1
Auto-rollover enabled
Controlfile Checkpointed at scn: 0x00000000004066db 01/08/2018 14:27:16
REDO THREAD RECORDS
(size = 256, compat size = 256, section max = 8, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 9, numrecs = 8)
THREAD #1 - status:0x40e thread links forward:0 back:0
#logs:3 first:1 last:3 current:3 last used seq#:0x45
enabled at scn: 0x000000000016be96 12/13/2017 17:22:26
disabled at scn: 0x0000000000000000 01/01/1988 00:00:00
opened at 01/06/2018 14:40:03 by instance newtest
Checkpointed at scn: 0x0000000000406702 01/08/2018 14:27:17
thread:1 rba:(0x45.44542.10)
406702 scn相同
DATA FILE #1:
name #6: C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\SYSTEM01.DBF
creation size=0 block size=8192 status=0xe flg=0x1 head=6 tail=6 dup=1
pdb_id 1, tablespace 0, index=2 krfil=1 prev_file_in_ts=0 prev_file_in_pdb=5
unrecoverable scn: 0x0000000000000000 01/01/1988 00:00:00
Checkpoint cnt:137 scn: 0x0000000000406702 01/08/2018 14:27:17
Stop scn: 0x0000000000406702 01/08/2018 14:27:17
Creation Checkpointed at scn: 0x0000000000000007 03/08/2017 15:57:36
thread:0 rba:(0x0.0.0)
SQL> shutdown abort;
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
数据库装载完毕。
SQL> alter session set events 'immediate trace name controlf level 12';
会话已更改。
SQL> select value from v$diag_info where name='Default Trace File';
VALUE
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_28212.
trc
DATABASE ENTRY
(size = 316, compat size = 316, section max = 1, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 1, numrecs = 1)
12/13/2017 17:22:22
DB Name "NEWTEST"
Database flags = 0x00404001 0x00001000 0x00000082
Controlfile Creation Timestamp 12/13/2017 17:22:22
Incmplt recovery scn: 0x0000000000000000
Resetlogs scn: 0x000000000016be96 Resetlogs Timestamp 12/13/2017 17:22:26
Prior resetlogs scn: 0x0000000000000001 Prior resetlogs Timestamp 03/08/2017 15:57:31
Redo Version: compatible=0xc200000
#Data files = 15, #Online files = 4
Database checkpoint: Thread=1 scn: 0x0000000000406702
Threads: #Enabled=1, #Open=0, Head=0, Tail=0
REDO THREAD RECORDS
(size = 256, compat size = 256, section max = 8, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 9, numrecs = 8)
THREAD #1 - status:0x40e thread links forward:0 back:0
#logs:3 first:1 last:3 current:3 last used seq#:0x45
enabled at scn: 0x000000000016be96 12/13/2017 17:22:26
disabled at scn: 0x0000000000000000 01/01/1988 00:00:00
opened at 01/06/2018 14:40:03 by instance newtest
Checkpointed at scn: 0x0000000000406702 01/08/2018 14:27:17
thread:1 rba:(0x45.44542.10) 存疑 可能我的库是空的什么没做
DATA FILE #1:
name #6: C:\APP\ADMINISTRATOR\VIRTUAL\ORADATA\NEWTEST\SYSTEM01.DBF
creation size=0 block size=8192 status=0xe flg=0x1 head=6 tail=6 dup=1
pdb_id 1, tablespace 0, index=2 krfil=1 prev_file_in_ts=0 prev_file_in_pdb=5
unrecoverable scn: 0x0000000000000000 01/01/1988 00:00:00
Checkpoint cnt:137 scn: 0x0000000000406702 01/08/2018 14:27:17
Stop scn: 0x0000000000406702 01/08/2018 14:27:17
Creation Checkpointed at scn: 0x0000000000000007 03/08/2017 15:57:36
thread:0 rba:(0x0.0.0)
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
数据库装载完毕。
SQL> alter session set sql_trace=true;
会话已更改。
SQL> alter database open;
数据库已更改。
SQL> alter pluggable database all open;
插接式数据库已变更。
create table bootstrap$ ( line# number not null, obj# number not null, sql_text varchar2(4000) not null) storage (initial 50K objno 59 extents (file 1 block 520))
file 1 block 520
file 1 block 520
SQL> select segment_name,file_id,block_id
2 from dba_extents where block_id=520;
SEGMENT_NAME
FILE_ID BLOCK_ID
BOOTSTRAP$
1 520
SYS_LOB0000000395C00003$$
3 520
select line#, sql_text from bootstrap$ where obj# not in (:1, :2)
SQL> desc bootstrap$;
名称 是否为空? 类型
LINE# NOT NULL NUMBER
OBJ# NOT NULL NUMBER
SQL_TEXT NOT NULL VARCHAR2(4000)
SQL> select * from bootstrap$ where rownum<5;
LINE# OBJ#
SQL_TEXT
-1 -1
8.0.0.0.0
0 0
CREATE ROLLBACK SEGMENT SYSTEM STORAGE ( INITIAL 112K NEXT 56K MINEXTENTS 1 MAX
EXTENTS 32765 OBJNO 0 EXTENTS (FILE 1 BLOCK 128))
16 16
CREATE TABLE TS$("TS#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"OWNER#" NUM
LINE# OBJ#
SQL_TEXT
BER NOT NULL,"ONLINE$" NUMBER NOT NULL,"CONTENTS$" NUMBER NOT NULL,"UNDOFILE#" N
UMBER,"UNDOBLOCK#" NUMBER,"BLOCKSIZE" NUMBER NOT NULL,"INC#" NUMBER NOT NULL,"SC
NWRP" NUMBER,"SCNBAS" NUMBER,"DFLMINEXT" NUMBER NOT NULL,"DFLMAXEXT" NUMBER NOT
NULL,"DFLINIT" NUMBER NOT NULL,"DFLINCR" NUMBER NOT NULL,"DFLMINLEN" NUMBER NOT
NULL,"DFLEXTPCT" NUMBER NOT NULL,"DFLOGGING" NUMBER NOT NULL,"AFFSTRENGTH" NUMBE
R NOT NULL,"BITMAPPED" NUMBER NOT NULL,"PLUGGED" NUMBER NOT NULL,"DIRECTALLOWED"
NUMBER NOT NULL,"FLAGS" NUMBER NOT NULL,"PITRSCNWRP" NUMBER,"PITRSCNBAS" NUMBER
,"OWNERINSTANCE" VARCHAR2(30),"BACKUPOWNER" VARCHAR2(30),"GROUPNAME" VARCHAR2(30
),"SPARE1" NUMBER,"SPARE2" NUMBER,"SPARE3" VARCHAR2(1000),"SPARE4" DATE) STORAGE
LINE# OBJ#
SQL_TEXT
( OBJNO 16 TABNO 2) CLUSTER C_TS#(TS#)
45 45
CREATE UNIQUE INDEX I_TS1 ON TS$(NAME) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAG
E ( INITIAL 64K NEXT 1024K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJ
NO 45 EXTENTS (FILE 1 BLOCK 408))
SQL> shutdown immediate;
ORA-01109: ??????
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup nomount;
ORACLE 例程已经启动。
Total System Global Area 2768240640 bytes
Fixed Size 8922760 bytes
Variable Size 704645496 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7852032 bytes
SQL> alter session set events=
2 '10046 trace name context forever,level 12';
会话已更改。
SQL> alter database mount;
数据库已更改。
SQL> alter database open;
数据库已更改。
SQL> select value from v$diag_info where name='Default Trace File';
VALUE
C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_29296.
trc
PARSING IN CURSOR #216903154672 len=19 dep=0 uid=0 oct=35 lid=0 tim=2333922720356 hv=1907384048 ad='7ff9c57c8428' sqlid='a01hp0psv0rrh'
alter database open
END OF STMT
PARSE #216903154672:c=0,e=1072,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=2333922720354
WAIT #216903154672: nam='control file sequential read' ela= 504 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922724810
WAIT #216903154672: nam='control file sequential read' ela= 785 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922725716
WAIT #216903154672: nam='control file sequential read' ela= 536 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922726356
WAIT #216903154672: nam='control file sequential read' ela= 463 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922726917
WAIT #216903154672: nam='control file sequential read' ela= 496 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922727812
WAIT #216903154672: nam='control file sequential read' ela= 497 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922728423
WAIT #216903154672: nam='control file sequential read' ela= 509 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922729046
WAIT #216903154672: nam='rdbms ipc reply' ela= 33 from_process=18 p2=0 p3=0 obj#=-1 tim=2333922729228
WAIT #216903154672: nam='rdbms ipc reply' ela= 54 from_process=18 p2=0 p3=0 obj#=-1 tim=2333922729331
WAIT #216903154672: nam='control file sequential read' ela= 478 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922729918
WAIT #216903154672: nam='control file sequential read' ela= 588 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922730619
WAIT #216903154672: nam='control file sequential read' ela= 535 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922731269
WAIT #216903154672: nam='control file sequential read' ela= 486 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922731869
WAIT #216903154672: nam='PGA memory operation' ela= 29 p1=1114112 p2=2 p3=0 obj#=-1 tim=2333922732026
WAIT #216903154672: nam='control file sequential read' ela= 12391 file#=4294967295 block#=23 blocks=64 obj#=-1 tim=2333922745383
WAIT #216903154672: nam='control file sequential read' ela= 865 file#=4294967295 block#=379 blocks=8 obj#=-1 tim=2333922746453
WAIT #216903154672: nam='control file sequential read' ela= 538 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922747301
WAIT #216903154672: nam='control file sequential read' ela= 542 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922747950
WAIT #216903154672: nam='control file sequential read' ela= 491 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922748568
WAIT #216903154672: nam='control file sequential read' ela= 493 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922749175
WAIT #216903154672: nam='control file sequential read' ela= 514 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922749813
WAIT #216903154672: nam='control file sequential read' ela= 521 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922751300
WAIT #216903154672: nam='control file sequential read' ela= 500 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922751913
*** 2018-01-09T10:00:32.640652+08:00 (CDB$ROOT(1))
WAIT #216903154672: nam='control file sequential read' ela= 405 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922752434
WAIT #216903154672: nam='control file sequential read' ela= 491 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922753088
WAIT #216903154672: nam='rdbms ipc reply' ela= 58047 from_process=16 p2=0 p3=0 obj#=-1 tim=2333922811414
WAIT #216903154672: nam='control file sequential read' ela= 548 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922812172
WAIT #216903154672: nam='control file sequential read' ela= 492 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922812737
WAIT #216903154672: nam='control file sequential read' ela= 494 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922813301
WAIT #216903154672: nam='control file sequential read' ela= 496 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922813869
WAIT #216903154672: nam='control file sequential read' ela= 548 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922817061
WAIT #216903154672: nam='control file sequential read' ela= 366 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922817494
WAIT #216903154672: nam='control file sequential read' ela= 357 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922817913
WAIT #216903154672: nam='control file sequential read' ela= 473 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922818445
WAIT #216903154672: nam='control file sequential read' ela= 494 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922819014
WAIT #216903154672: nam='control file sequential read' ela= 497 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922819708
WAIT #216903154672: nam='control file sequential read' ela= 524 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922820305
WAIT #216903154672: nam='control file sequential read' ela= 486 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922820862
WAIT #216903154672: nam='control file sequential read' ela= 487 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922821420
WAIT #216903154672: nam='control file sequential read' ela= 495 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922822092
WAIT #216903154672: nam='control file sequential read' ela= 524 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922822689
WAIT #216903154672: nam='control file sequential read' ela= 485 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922823246
WAIT #216903154672: nam='control file sequential read' ela= 487 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922823804
WAIT #216903154672: nam='control file sequential read' ela= 549 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922824430
WAIT #216903154672: nam='Disk file operations I/O' ela= 550 FileOperation=2 fileno=1 filetype=2 obj#=-1 tim=2333922825031
WAIT #216903154672: nam='Disk file operations I/O' ela= 447 FileOperation=2 fileno=3 filetype=2 obj#=-1 tim=2333922825510
WAIT #216903154672: nam='Disk file operations I/O' ela= 428 FileOperation=2 fileno=5 filetype=2 obj#=-1 tim=2333922825967
WAIT #216903154672: nam='Disk file operations I/O' ela= 432 FileOperation=2 fileno=7 filetype=2 obj#=-1 tim=2333922826427
WAIT #216903154672: nam='Disk file operations I/O' ela= 422 FileOperation=2 fileno=201 filetype=6 obj#=-1 tim=2333922826876
WAIT #216903154672: nam='control file sequential read' ela= 394 file#=0 block#=24 blocks=1 obj#=-1 tim=2333922827395
WAIT #216903154672: nam='control file sequential read' ela= 326 file#=0 block#=356 blocks=1 obj#=-1 tim=2333922828096
WAIT #216903154672: nam='control file sequential read' ela= 8958 file#=0 block#=1120 blocks=1 obj#=-1 tim=2333922837120
WAIT #216903154672: nam='direct path read' ela= 3287 file number=5 first dba=1 block cnt=1 obj#=-1 tim=2333922840972
WAIT #216903154672: nam='control file sequential read' ela= 7692 file#=0 block#=25 blocks=1 obj#=-1 tim=2333922848788
WAIT #216903154672: nam='control file parallel write' ela= 227 files=2 block#=17 requests=2 obj#=-1 tim=2333922849478
WAIT #216903154672: nam='control file parallel write' ela= 309 files=2 block#=15 requests=2 obj#=-1 tim=2333922849999
WAIT #216903154672: nam='control file parallel write' ela= 461 files=2 block#=1 requests=2 obj#=-1 tim=2333922850661
WAIT #216903154672: nam='control file sequential read' ela= 495 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922851283
WAIT #216903154672: nam='control file sequential read' ela= 451 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922851810
WAIT #216903154672: nam='control file sequential read' ela= 486 file#=0 block#=15 blocks=1 obj#=-1 tim=2333922852353
WAIT #216903154672: nam='control file sequential read' ela= 467 file#=0 block#=17 blocks=1 obj#=-1 tim=2333922852898
WAIT #216903154672: nam='control file sequential read' ela= 501 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922853477
WAIT #216903154672: nam='control file sequential read' ela= 488 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922854137
WAIT #216903154672: nam='control file sequential read' ela= 444 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922854654
WAIT #216903154672: nam='control file sequential read' ela= 466 file#=0 block#=15 blocks=1 obj#=-1 tim=2333922855175
WAIT #216903154672: nam='control file sequential read' ela= 433 file#=0 block#=17 blocks=1 obj#=-1 tim=2333922855682
WAIT #216903154672: nam='control file sequential read' ela= 488 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922856250
WAIT #216903154672: nam='control file parallel write' ela= 328 files=2 block#=781 requests=2 obj#=-1 tim=2333922856848
WAIT #216903154672: nam='control file parallel write' ela= 283 files=2 block#=18 requests=2 obj#=-1 tim=2333922857348
WAIT #216903154672: nam='control file parallel write' ela= 273 files=2 block#=16 requests=2 obj#=-1 tim=2333922857789
WAIT #216903154672: nam='control file parallel write' ela= 267 files=2 block#=1 requests=2 obj#=-1 tim=2333922858230
WAIT #216903154672: nam='rdbms ipc reply' ela= 5765 from_process=16 p2=0 p3=0 obj#=-1 tim=2333922864075
WAIT #216903154672: nam='control file sequential read' ela= 357 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922864496
WAIT #216903154672: nam='control file sequential read' ela= 372 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922864898
WAIT #216903154672: nam='control file sequential read' ela= 360 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922865294
WAIT #216903154672: nam='control file sequential read' ela= 338 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922865661
WAIT #216903154672: nam='control file sequential read' ela= 342 file#=0 block#=24 blocks=1 obj#=-1 tim=2333922866033
WAIT #216903154672: nam='db file sequential read' ela= 335 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922866403
WAIT #216903154672: nam='control file sequential read' ela= 236 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922867533
WAIT #216903154672: nam='control file sequential read' ela= 372 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922867939
WAIT #216903154672: nam='control file sequential read' ela= 897 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922868872
WAIT #216903154672: nam='control file sequential read' ela= 345 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922869246
WAIT #216903154672: nam='control file sequential read' ela= 17737 file#=0 block#=821 blocks=1 obj#=-1 tim=2333922887014
WAIT #216903154672: nam='control file parallel write' ela= 108 files=2 block#=822 requests=2 obj#=-1 tim=2333922887918
WAIT #216903154672: nam='control file parallel write' ela= 218 files=2 block#=17 requests=2 obj#=-1 tim=2333922888472
WAIT #216903154672: nam='control file parallel write' ela= 245 files=2 block#=15 requests=2 obj#=-1 tim=2333922889049
WAIT #216903154672: nam='control file parallel write' ela= 272 files=2 block#=1 requests=2 obj#=-1 tim=2333922889801
WAIT #216903154672: nam='control file sequential read' ela= 517 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922890543
WAIT #216903154672: nam='control file sequential read' ela= 572 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922891192
WAIT #216903154672: nam='control file sequential read' ela= 504 file#=0 block#=15 blocks=1 obj#=-1 tim=2333922891773
WAIT #216903154672: nam='control file sequential read' ela= 1345 file#=0 block#=17 blocks=1 obj#=-1 tim=2333922893195
WAIT #216903154672: nam='control file sequential read' ela= 515 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922893988
WAIT #216903154672: nam='control file sequential read' ela= 370 file#=1 block#=1 blocks=1 obj#=-1 tim=2333922894456
WAIT #216903154672: nam='control file sequential read' ela= 511 file#=0 block#=15 blocks=1 obj#=-1 tim=2333922895045
WAIT #216903154672: nam='control file sequential read' ela= 1185 file#=0 block#=17 blocks=1 obj#=-1 tim=2333922896306
WAIT #216903154672: nam='control file sequential read' ela= 573 file#=0 block#=19 blocks=1 obj#=-1 tim=2333922897018
WAIT #216903154672: nam='control file sequential read' ela= 525 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922897802
WAIT #216903154672: nam='control file sequential read' ela= 507 file#=0 block#=15 blocks=1 obj#=-1 tim=2333922898387
WAIT #216903154672: nam='control file sequential read' ela= 504 file#=0 block#=17 blocks=1 obj#=-1 tim=2333922898967
WAIT #216903154672: nam='rdbms ipc reply' ela= 95689 from_process=17 p2=0 p3=0 obj#=-1 tim=2333922994750
WAIT #216903154672: nam='control file sequential read' ela= 250 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922995563
WAIT #216903154672: nam='control file sequential read' ela= 272 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922995867
WAIT #216903154672: nam='control file sequential read' ela= 299 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922996193
WAIT #216903154672: nam='control file sequential read' ela= 299 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922996523
WAIT #216903154672: nam='control file sequential read' ela= 266 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922996866
WAIT #216903154672: nam='control file sequential read' ela= 259 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922997151
WAIT #216903154672: nam='control file sequential read' ela= 232 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922997407
WAIT #216903154672: nam='control file sequential read' ela= 247 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922997678
WAIT #216903154672: nam='log file sync' ela= 535 buffer#=14672 sync scn=4282963 p3=0 obj#=-1 tim=2333922998296
WAIT #216903154672: nam='control file sequential read' ela= 289 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922998718
WAIT #216903154672: nam='control file sequential read' ela= 307 file#=0 block#=16 blocks=1 obj#=-1 tim=2333922999050
WAIT #216903154672: nam='control file sequential read' ela= 232 file#=0 block#=18 blocks=1 obj#=-1 tim=2333922999307
WAIT #216903154672: nam='control file sequential read' ela= 223 file#=0 block#=782 blocks=1 obj#=-1 tim=2333922999555
WAIT #216903154672: nam='instance state change' ela= 27 layer=2 value=1 waited=1 obj#=-1 tim=2333922999613
WAIT #216903154672: nam='control file sequential read' ela= 232 file#=0 block#=1 blocks=1 obj#=-1 tim=2333922999882
WAIT #216903154672: nam='control file sequential read' ela= 376 file#=1 block#=1 blocks=1 obj#=-1 tim=2333923000283
WAIT #216903154672: nam='control file sequential read' ela= 246 file#=0 block#=16 blocks=1 obj#=-1 tim=2333923000554
WAIT #216903154672: nam='control file sequential read' ela= 225 file#=0 block#=18 blocks=1 obj#=-1 tim=2333923000804
WAIT #216903154672: nam='control file sequential read' ela= 1038 file#=4294967295 block#=355 blocks=24 obj#=-1 tim=2333923001947
WAIT #216903154672: nam='db file sequential read' ela= 26372 file#=1 block#=520 blocks=1 obj#=-1 tim=2333923028496
分享文章:控制文件与数据库初始化
文章转载:http://azwzsj.com/article/jchdcd.html