Oracle Dump Redo Log File 说明
关于Dump redo log 的示例,MOS 上的文档:[ID 1031381.6] 有详细说明。Dump 有两种方式:(1)使用
一. dump redo 说明
关于Dump redo log 的示例,MOS 上的文档:[ID 1031381.6] 有详细说明。Dump 有两种方式:
(1)使用'alter session' 命令dumpredo header。
(2)使用'alter system dump logfile' 命令dump logfile contents。
可以在mount,nomout和open状态下使用如上命令,,并且使用以上命令需要'alter system' 的权限。 可以使用该命令dump onlie redo log 或者归档文件。 当操作系统系统相同的情况下,还可以dump其他db的log 文件。
有如下dump 方法:
1.To dump records based in DBA (Data Block Address)
2.To dump records based on RBA (Redo Block Address)
3.To dump records based on SCN
4.To dump records based on time
5.To dump records based on layer and opcode
6.Dump the file header information
7.Dump an entire log file:
二. 具体使用示例 2.1 To dump records based on DBA (Data Block Address)
关于DBA的说明,参考:
Oracle rdba和 dba 说明
根据DBA进行dump,主要是根据file和block 号来进行dump。 这个的block 是一个范围值。
11g命令格式如下:
ALTER SYSTEM DUMP LOGFILE 'filename' DBA MIN fileno . blockno DBA MAX fileno . blockno;
如果是Oracle 10g,需要省略'.',即格式如下:
ALTER SYSTEM DUMP LOGFILE 'filename' DBA MIN fileno blockno DBA MAX fileno blockno;
否则会报: ORA-01963: Must specify a block number 错误。
如:
SYS@anqing1(rac1)> select * fromv$version where rownum=1;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise EditionRelease 10.2.0.4.0 - Prod
SQL>select distinct dbms_rowid.rowid_relative_fno(rowid) rel_fno,
dbms_rowid.rowid_block_number(rowid)blockno from ta;
REL_FNO BLOCKNO
---------- ----------
1 294608
1 294609
1 294612
1 294614
1 294621
1 294635
1 294643
1 294654
1 294656
1 294657
6 10385
REL_FNO BLOCKNO
---------- ----------
6 10393
6 10410
6 10411
6 10415
6 10416
6 10458
6 10461
6 10464
6 10465
6 10468
6 10472
确定log file 位置:
SYS@anqing1(rac1)> selecta.group#,a.status,b.member from v$log a,v$logfile b where a.group#=b.group#;
GROUP# STATUS MEMBER
---------- --------------------------------------------------------------------
3 INACTIVE +DATA/anqing/onlinelog/redo03.log
2 INACTIVE +DATA/anqing/onlinelog/redo02.log
1 CURRENT +DATA/anqing/onlinelog/group_1.277.751552735
1 CURRENT +FRA/anqing/onlinelog/group_1.426.751552739
4 CURRENT +DATA/anqing/onlinelog/group_4.282.751560131
5 INACTIVE +DATA/anqing/onlinelog/group_5.283.751560139
6 rows selected.
SYS@anqing1(rac1)> alter system dump logfile'+data/anqing/onlinelog/redo02.log' dbamin 6 10458 dba max 6 10472;
System altered.
SYS@anqing1(rac1)> oradebug setmypid
Statement processed.
SYS@anqing1(rac1)> oradebug tracefile_name
/u01/app/oracle/admin/anqing/udump/anqing1_ora_30373.trc
SYS@anqing1(rac1)>
[oracle@rac1 ~]$cat /u01/app/oracle/admin/anqing/udump/anqing1_ora_30373.trc
/u01/app/oracle/admin/anqing/udump/anqing1_ora_30373.trc
Oracle Database 10g Enterprise EditionRelease 10.2.0.4.0 - Production
With the Partitioning, Real ApplicationClusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1
System name: Linux
Node name: rac1
Release: 2.6.18-194.el5
Version: #1 SMP Tue Mar 16 21:52:43 EDT 2010
Machine: i686
Instance name: anqing1
Redo thread mounted by this instance: 1
Oracle process number: 28
Unix process pid: 30373, image: oracle@rac1(TNS V1-V3)
*** 2011-08-08 22:10:37.053
*** ACTION NAME:() 2011-08-08 22:10:37.052
*** MODULE NAME:(sqlplus@rac1 (TNS V1-V3))2011-08-08 22:10:37.052
*** SERVICE NAME:(SYS$USERS) 2011-08-0822:10:37.052
*** SESSION ID:(127.27077) 2011-08-0822:10:37.052
DUMP OF REDO FROM FILE'+data/anqing/onlinelog/redo02.log'
Opcodes *.*
DBAs: (file # 6, block # 10458) thru (file #6, block # 10472)
RBAs: 0x000000.00000000.0000 thru0xffffffff.ffffffff.ffff
SCNs: scn: 0x0000.00000000 thru scn:0xffff.ffffffff
Times: creation thru eternity
FILEHEADER:
Compatibility Vsn = 169870336=0xa200400
Db ID=715014091=0x2a9e3fcb, Db
Activation ID=682502900=0x28ae2af4
Control Seq=4261=0x10a5, File size=102400=0x19000
File Number=2, Blksiz=512, File Type=2 LOG
descrip:"Thread0001, Seq# 0000000119, SCN 0x0000006ab1bc-0x0000006e0c84"
thread: 1 nab: 0x18ffd seq: 0x00000077 hws:0x2 eot: 0 dis: 0
resetlogs count: 0x2ccbc8df scn:0x0000.000704fa (460026)
resetlogs terminal rcv count: 0x0 scn:0x0000.00000000
prevresetlogs count: 0x2ebbfe8f scn: 0x0000.0006ce7b (446075)
prevresetlogs terminal rcv count: 0x0 scn: 0x0000.00000000
Low scn: 0x0000.006ab1bc (6992316) 07/30/2011 05:39:17
Nextscn: 0x0000.006e0c84 (7212164) 08/03/2011 14:14:34
Enabled scn: 0x0000.000704fa (460026)05/19/2011 12:38:55
Thread closed scn: 0x0000.006ab1bc (6992316)07/30/2011 05:39:17
Diskcksum: 0xd530 Calc cksum: 0xd530
Terminal recovery stop scn: 0x0000.00000000
Terminal recovery 01/01/1988 00:00:00
Mostrecent redo scn: 0x0000.00000000
Largest LWN: 1874 blocks
End-of-redo stream : No
Unprotected mode
Miscellaneous flags: 0x0
Thread internal enable indicator: thr: 0, seq:0 scn: 0x0000.00000000
REDO RECORD - Thread:1 RBA:0x000077.00000cd6.017c LEN: 0x0048 VLD: 0x01
SCN: 0x0000.006ac8a9 SUBSCN: 1 07/30/2011 08:28:08
CHANGE #1 MEDIA RECOVERY MARKERSCN:0x0000.00000000 SEQ: 0 OP:18.3
Reuse redo entry
Range reuse: tsn=1 base=8542185 nblks=8
REDO RECORD - Thread:1 RBA:0x000077.00006e99.0078 LEN: 0x0044 VLD: 0x01
SCN: 0x0000.006b7ae1 SUBSCN: 1 07/31/2011 06:18:10
CHANGE #1 MEDIA RECOVERY MARKERSCN:0x0000.00000000 SEQ: 0 OP:17.4
Datafile resize marker - file: 2 old size:153600 new size: 156160
REDO RECORD - Thread:1 RBA:0x000077.00007884.017c LEN: 0x0048 VLD: 0x01
SCN: 0x0000.006b8d16 SUBSCN: 1 07/31/2011 08:33:09
CHANGE #1 MEDIA RECOVERY MARKERSCN:0x0000.00000000 SEQ: 0 OP:18.3
Reuse redo entry
Range reuse: tsn=1 base=8542217 nblks=1024
*** 2011-08-08 22:10:54.783
END OF REDO DUMP
----- Redo read statistics for thread 1-----
Read rate (ASYNC): 51197Kb in 17.78s =>2.81 Mb/sec
Total physical reads: 51197Kb
Longest record: 8Kb, moves: 0/85186 (0%)
Change moves: 30223/143291 (21%), moved:5Mb
Longest LWN: 937Kb, moves: 6/66426 (0%),moved: 0Mb
Last redo scn: 0x0000.006e087b (7211131)
----------------------------------------------
[oracle@rac1 ~]$

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

InnoDB的全文搜索功能非常强大,能够显着提高数据库查询效率和处理大量文本数据的能力。 1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。 2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。 3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

是的,可以在 Windows 7 上安装 MySQL,虽然微软已停止支持 Windows 7,但 MySQL 仍兼容它。不过,安装过程中需要注意以下几点:下载适用于 Windows 的 MySQL 安装程序。选择合适的 MySQL 版本(社区版或企业版)。安装过程中选择适当的安装目录和字符集。设置 root 用户密码,并妥善保管。连接数据库进行测试。注意 Windows 7 上的兼容性问题和安全性问题,建议升级到受支持的操作系统。

全表扫描在MySQL中可能比使用索引更快,具体情况包括:1)数据量较小时;2)查询返回大量数据时;3)索引列不具备高选择性时;4)复杂查询时。通过分析查询计划、优化索引、避免过度索引和定期维护表,可以在实际应用中做出最优选择。

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

聚集索引和非聚集索引的区别在于:1.聚集索引将数据行存储在索引结构中,适合按主键查询和范围查询。2.非聚集索引存储索引键值和数据行的指针,适用于非主键列查询。
