Oracle Internals Notes : Controlfile Dumps

          The contents of the current controlfile can be dumped in text form to a process trace file in the user_dump_dest directory using the CONTROLF dump. The levels for this dump are as follows. 

Dump LevelDump Contains
1only the file header
2just the file header, the database info record, and checkpoint progress records
3all record types, but just the earliest and latest records for circular reuse record types
4as above, but includes the 4 most recent records for circular reuse record types
5+as above, but the number of circular reuse records included doubles with each level

For example, the following syntax could be used to get a text dump on the controlfile in the trace file of the current process showing all the controlfile record types but only the oldest and most recent of the circular reuse records.

oradebug setmypid
oradebug dump controlf 3
Of course, the session must be connected AS SYSDBA to use the ORADEBUG facility. However, any session with the ALTER SESSION privilege can use the following event syntax to take the same dump.
alter session set events 'immediate trace name controlf level 3';

http://www.ixora.com.au/scripts/dumps.htm 

Oracle Advanced Performance Tuning Scripts

Dump and Tracing Scripts

trace_file_name.sql

This script reports the pathname to the trace file for the current session. The trace file name is remembered by SQL*Plus for use by other APT scripts.

Note: The format of the trace file name is platform specific. This script contains three separate queries for different platforms. It is the user's responsibility to comment out those that do not apply.

Download script for: 7.3, 8.0 or 8.1

trace_event_on.sql

This is a simple script to set a trace event in the current session. Trace information is written to the process trace file in the user_dump_dest directory. The trace events are normally numbers in the range 10000 to 10999. For example, event 10053 can be used to trace cost-based optimizer execution path evaluation, and event 10104 can be used to trace hash join processing. Other event numbers are mentioned elsewhere on this site. For most events, the level is merely 1. However, multiple levels are defined for some events to control the level of detail returned.

Warning: Setting events changes the behavior of the Oracle server, and can destroy databases. Do not set events on production instances unless you have checked with Oracle Support.

Download script for: 7.3, 8.0 or 8.1

trace_event_off.sql

This is a simple script to stop a trace in the current session.

Download script for: 7.3, 8.0 or 8.1

which_events.sql

This script checks to see which events are set in the current session.

Download script for: 7.3, 8.0 or 8.1

post_event.sql

This script can be used to set an event in another session. To select a session before running this script, please see the first three scripts on the Session Scripts page. To turn an event off, use level 0.

Download script for: 7.3, 8.0 or 8.1

dump.sql

This is a simple script to dump an internal structure to the trace file for the current process. The systemstate and library_cache dumps are the most frequently used, at levels 10 and 4 respectively.

Warning: These dumps can produce VERY large trace files. They can also have a noticeable effect on system performance. There are other dumps that can damage databases. As always, don't use these things on production instances unless you have checked with Oracle Support.

Download script for: 7.3, 8.0 or 8.1

dump_logfile.sql

This script dumps the contents of a redo log file to the trace file for the current process in human (?) readable format. One nice thing about this script is that it can remind you about the syntax for the options.

Warning: Log file dumps can produce VERY large trace files. As always, don't do this on production instances unless you have checked with Oracle Support.

Download script for: 7.3, 8.0 or 8.1

redo_time.sql

Two of the options for dumping logfiles are to specify minimum and maximum time boundaries for the redo to be dumped. Those times need to be expressed in decimal using a special formula, which is what this script does.

Download script for: 7.3, 8.0 or 8.1

trace_zip.sql

This script can be used to dynamically zip the current process's trace file, prior to taking a large dump or trace, like a redo log file dump or systemstate dump. It creates a named pipe in place of the process's trace file, and spawns a gzip process to compress it. This slows down the taking dumps and traces significantly, but it is sometimes necessary if disk space is short.

This script is Unix specific, and uses the trace_file_name.sql script above.

Download script for: 7.3, 8.0 or 8.1

trace_nozip.sql

This script deletes the named pipe created by trace_zip.sql.

Download script for: 7.3, 8.0 or 8.1

blockdump.sql

This is one of the most important script for learning about Oracle internals. It dumps data blocks in a human readable form to the process' trace file. The Oracle8 facility allows for a range of blocks to be dumped, but in Oracle7 you can only dump one block at a time. Another important difference to be aware of is that Oracle8 does consistent gets on the blocks to be dumped, whereas Oracle7 dumps the current mode buffer.

Download script for: 7.3, 8.0 or 8.1

next_blockdump.sql

In Oracle7 you can only dump one block at a time, but this script can be used to dump consecutive blocks.

Download script for: 7.3

hex_blockdump.sql

This script does blockdumps in hex, rather than in human-readable format.

Download script for: 7.3, 8.0 or 8.1

next_hex_blockdump.sql

And this is the Oracle7 follow-on script.

Download script for: 7.3

header_dump.sql

This script dumps a segment header block by name, rather than by numbers.

Download script for: 7.3, 8.0 or 8.1

treedump.sql

This script dumps the structure of an index tree. The dump file contains one line for each block in the tree, indented to show its level, together with a count of the number of index entries in the block.

Download script for: 7.3, 8.0 or 8.1

buffers.pl

This script is intended for researching where new blocks are introduced to each buffer pool, and how the buffer aging algorithm works. It reads a trace file containing a dump of the buffer headers at level 4, and prints out the file and block number of each buffer in LRU order. The buffers dump can be taken as follows:
oradebug dump buffers 4
or
alter session set events 'immediate trace name buffers level 4';
The trace file must not contain more than one dump, so each dump must be taken from a new session.

Download script for: 8.1   -- It probably works back to 7.3 also, but has not been tested.

containing_chunk.sql

This script identifies the shared pool chunk containing a specific memory address. The address must already be defined to SQL*Plus in decimal as &Addr. This script is dependent on the rawtonum function below.

Download script for: 8.0 or 8.1

rawtonum.sql

This script creates a function that converts RAW values to NUMBERs. This is useful for calculating offsets from memory addresses.

Download script for: 7.3, 8.0 or 8.1

create_v$my_event.sql

This script creates a view over V$SESSION_EVENT that selects just the rows for the current session.

Download script for: 7.3, 8.0 or 8.1


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84291/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-84291/

内容概要:本资源聚焦于配电网在发生故障后的两阶段鲁棒恢复研究,旨在提升电力系统在不确定性条件下的恢复能力与运行可靠性。研究采用两阶段优化方法,第一阶段进行预恢复决策,如网络重构、分布式电源出力调整等,以最小化预期损失;第二阶段则针对实际发生的故障场景实施校正控制,利用鲁棒优化理论应对负荷波动、新能源出力不确定性等因素,确保恢复方案的可行性与强健性。资源提供了完整的Matlab代码实现,复现了相关顶刊研究成果,便于使用者深入理解模型构建、算法求解及仿真分析全过程。; 适合人群:具备电力系统分析、优化理论基础及Matlab编程能力的研究生、科研人员及电力行业工程师。; 使用场景及目标:① 学习并掌握配电网故障恢复的先进优化方法,特别是两阶段鲁棒优化模型的构建与应用;② 复现和验证顶刊论文中的算法,为自身科研工作提供技术参考和代码基础;③ 将所学方法拓展应用于微电网、主动配电网等新型电力系统的可靠性评估与优化调度研究。; 阅读建议:学习者应结合提供的Matlab代码,仔细研读模型的数学公式与求解逻辑,重点关注不确定性建模、两阶段决策变量的设定以及鲁棒对等转换技巧。建议在掌握基础案例后,尝试修改参数或引入新的约束条件进行扩展研究,以深化理解并提升创新能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值