浅析控制文件的创建
当我们用不同方式创建控制文件的时候,可能会对控制文件中的信息产生不同的影响,下面分别介绍以noresetlogs方式、resetlogs方式创建控制文件,以查看控制文件中信息的变化。一:以noresetlogs方式创建控制文件1 重建控制文件语句如下STARTUP NOMOUNTCREATE CONTROLFILE REUSE DATABASE "CRM" NORESETLOGS ARCHIVELOGMAXLOGFILES 16MAXLOGMEMBERS 3MAXDATAFILES 100MAXINSTANCES 8MAXLOGHISTORY 292LOGFILEGROUP 1 ('/oracle/app/db1/dbs/log1CRM.dbf','/oracle/CRM2/CRM/redo01b.log') SIZE 200M,GROUP 2 ('/oracle/app/db1/dbs/log2CRM.dbf','/oracle/CRM2/CRM/redo02b.log') SIZE 50M,GROUP 3 ('/oracle/CRM2/CRM/redo03.log','/oracle/CRM2/CRM/redo03b.log') SIZE 200M,GROUP 4 ('/oracle/CRM2/CRM/redo04.log','/oracle/CRM2/CRM/redo04b.log') SIZE 200M,GROUP 5 ('/oracle/CRM2/CRM/redo05.log','/oracle/CRM2/CRM/redo05b.log') SIZE 200M,GROUP 6 ('/oracle/CRM2/CRM/redo06.log','/oracle/CRM2/CRM/redo06b.log') SIZE 200MDATAFILE'/oracle/test/system1.dbf','/oracle/test/zxb.dbf','/oracle/test/sysaux01.dbf','/oracle/test/users01.dbf','/oracle/test/zxa.dbf','/oracle/test/test1.dbf','/oracle/test/zxc.dbf','/oracle/test/undotbs1.dbf','/oracle/test/zxbig.dbf'CHARACTER SET ZHS16GBK;2转储 数据文件头部信息如下:V10 STYLE FILE HEADER:Compatibility Vsn = 169869568=0xa200100Db ID=3601019238=0xd6a33166, Db Name='CRM'Activation ID=0=0x0Control Seq=9739=0x260b, File size=640=0x280File Number=4, Blksiz=8192, File Type=3 DATATablespace #4 - USERS rel_fn:4Creation at scn: 0x0000.000027b9 10/22/2005 21:45:00Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0reset logs count:0x2fac7053 scn: 0x0000.802c8c23 reset logs terminal rcv data:0x0 scn: 0x0000.00000000prev reset logs count:0x2fac6f51 scn: 0x0000.802c3dfd prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000recovered at 12/05/2012 05:28:04status:0x0 root dba:0x00000000 chkpt cnt: 1183 ctl cnt:1182begin-hot-backup file size: 0Checkpointed at scn: 0x0000.8031da6a(2150750826) 11/22/2012 19:25:50thread:1 rba:(0x1e.c8f.10)3 转储新控制文件信息如下:----------------------------------------------------------------------------------------------------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/05/2012 05:47:51DB Name "CRM"Database flags = 0x00400103 0x00001000Controlfile Creation Timestamp 12/05/2012 05:47:52Incmplt recovery scn: 0x0000.00000000Resetlogs scn: 0x0000.802c8c23 Resetlogs Timestamp 11/20/2012 07:01:39Prior resetlogs scn: 0x0000.802c3dfd Prior resetlogs Timestamp 11/20/2012 06:57:21Redo Version: compatible=0xa200100#Data files = 9, #Online files = 9Database checkpoint: Thread=1 scn: 0x0000.a5aaadfdThreads: #Enabled=1, #Open=0, Head=0, Tail=0--------------------------------------------------------------------------------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:0x0 flags:0x0 dirty:0low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)on disk scn: 0x0000.00000000 01/01/1988 00:00:00resetlogs scn: 0x0000.00000000 01/01/1988 00:00:00heartbeat: 801186341 mount id: 3609678535-------------------------------------------------------------------------------------DATA FILE #4:(name #18) /oracle/test/users01.dbfcreation size=0 block size=8192 status=0x12 head=18 tail=18 dup=1tablespace 4, index=4 krfil=4 prev_file=0unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00Checkpoint cnt:1183 scn: 0x0000.a5aaadfd 01/01/1988 00:00:00Stop scn: 0x0000.a5aaadfd (2779426301)12/05/2012 05:47:52Creation Checkpointed at scn: 0x0000.000027b9 10/22/2005 21:45:00thread:0 rba:(0x0.0.0)4 转储当前联机日志最后一个记录如下REDO RECORD - Thread:1 RBA: 0x000040.0000e490.0160 LEN: 0x0064 VLD: 0x02SCN: 0x0000.a5aaadfb SUBSCN: 1 12/05/2012 04:52:27CHANGE #1 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ: 0 OP:23.1Block Written - afn: 1 rdba: 0x0040edc8 BFT:(1024,4255176) non-BFT:(1,60872)scn: 0x0000.a5aaadf9 seq: 0x07 易做图:0x04Block Written - afn: 1 rdba: 0x0040006a BFT:(1024,4194410) non-BFT:(1,106)scn: 0x0000.a5aaadfa seq: 0x01 易做图:0x06Block Written - afn: 1 rdba: 0x00400009 BFT:(1024,4194313) non-BFT:(1,9)scn: 0x0000.a5aaadfa seq: 0x01 易做图:0x04END OF REDO DUMP----- Redo read statistics for thread 1 -----Read rate (ASYNC): 29255Kb in 41.53s => 0.69 Mb/secTotal physical reads: 29255KbLongest record: 10Kb, moves: 0/92501 (0%)Change moves: 41327/182885 (22%), moved: 10MbLongest LWN: 1537Kb, moves: 7/364 (1%), moved: 6MbLast redo scn: 0x0000.a5aaadfb (2779426299)5总结:Noresetlogs方式创建控制文件数据文件头部情况控制文件中记录数据文件信息检查点计数值chkpt cnt: 1183检查点计数值Checkpoint cnt:1183检查点scn值0x8031da6a检查点scn值scn: 0xa5aaadfdRedo 块地址rba:(0x1e.c8f.10)Stop scnStop scn: 0xa5aaadfdDatabase checkpoint: Thread=1 scn: 0x0000.a5aaadfdCheckpoint cnt:1183 scn: 0x0000.a5aaadfd 01/01/1988 00:00:00Stop scn: 0x0000.a5aaadfd (2779426301)12/05/2012 05:47:52补充:综合编程 , 其他综合 ,
上一个:apk签名
下一个:编程语言中交换两个变量的值的几种方案