`
380071587
  • 浏览: 447295 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

学习 alter system dump

 
阅读更多

摘自:http://blog.sina.com.cn/s/blog_40abcc8b010002ht.html

分享metalink上的doc
--------------------------------------------------------------------------------------------------

PURPOSE This article explain how to obtain a dump of the header information in the online redo log file(s), as well as obtaining selected information from the online or archived redo log files.

SCOPE & APPLICATION Informational

You are working with Oracle Technical Support. As part of the diagnostic process, you have been asked to take a dump of the redo log files. The information in the logs is often used to help diagnose corruption issues.

The following commands will be used in this process:
1. The 'alter session' command is used to dump redo headers.
2. Use the 'alter system dump logfile' to dump log file contents.

This command requires 'ALTER SYSTEM' system privilege. The database can be in mount, nomount or open state when the command is issued. An online log file or an archived log file can be dumped. It is even possible to dump a file from another database, as long as the operating systems are the same.

Output from the command is put into the session's trace file.

The following ways of dumping a redo log file are covered:

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 time
4. To dump records based on layer and opcode
5. Dump the file header information
6. Dump an entire log file:

1. To dump records based on DBA (Data Block Address)
--------------------------------------------------
This will dump all redo records for the range of data blocks specified for a given file # and block # range.
From sqldba or svrmgr, issue the following command:

ALTER SYSTEM DUMP LOGFILE 'filename'
DBA MIN fileno . blockno
DBA MAX fileno . blockno;
Example:
========
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
DBA MIN 5 . 31125
DBA MAX 5 . 31150;

This will cause all the changes to the specified range of data blocks to be dumped to the trace file. In the example given, all redo records for file #5, blocks 31125 thru 31150 are dumped.

2. To dump records based on RBA (Redo Block Address)
-------------------------------------------------
This will dump all redo records for the range of redo addresses specified for the given sequence number and block number.

Syntax:
ALTER SYSTEM DUMP LOGFILE 'filename'
RBA MIN seqno . blockno
RBA MAX seqno . blockno;
Example:
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
RBA MIN 2050 . 13255
RBA MAX 2255 . 15555;

3. To dump records based on time.
------------------------------
Using this option will cause redo records created within the time range specified to be dumped to the trace file.

From sqldba or svrmgr, issue the following command:
ALTER SYSTEM DUMP LOGFILE 'filename'
TIME MIN value
TIME MAX value;

Example:
========
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
TIME MIN 299425687
TIME MAX 299458800;
Please Note: the time value is given in REDO DUMP TIME

4. To dump records based on layer and opcode.
------------------------------------------
LAYER and OPCODE are used to dump all log records for a particular type of redo record, such as all dropped row pieces.
From sqldba or svrmgr, issue the following command:

ALTER SYSTEM DUMP LOGFILE 'filename'
LAYER value
OPCODE value;
Example:
========
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
LAYER 11
OPCODE 3;

5. Dump the file header information:
---------------------------------
This will dump file header information for every online redo log file. From sqldba or svrmgr, issue the following command:
alter session set events 'immediate trace name redohdr level 10';

6. Dump an entire log file:
------------------------
From sqldba or svrmgr, issue the following command:
ALTER SYSTEM DUMP LOGFILE 'filename';
Please note:
Fully qualify the filename, and include the single quotes.

Example:
========
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf';

分享到:
评论

相关推荐

    oracle系统状态trace文件分析器

    就用该方法  system state dumps ==> 整个系统的所有进程中的所有对象状态 <br>进程状态转储可以用以下几种方式: process state dumps: 1.ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME PROCESS...

    oracle安装及备份

    alter user system identified by manager;修改用户密码 grant dba to user_name 用户授权 drop user user_name cascade 清空指定用户的所有数据,但表空间已占用的空间不会释放 create or replace ...

    Oracle8i_9i数据库基础

    §9.3 ALTER USER 命令 205 §9.4 DROP USER 命令 205 §9.5 GRANT 命令与REVOKE 命令 206 §9.5.1 GRANT 命令 206 §9.5.2 REVOKE 命令 206 §9.6 权限和角色 207 §9.6.1 建立角色 207 §9.6.2 给角色授权 208 §...

    数据库项目组日常运维及应急故障处理手册.docx

    nohup expdp system/manager schemas=kdjm DIRECTORY=DUMP_FILES PARALLEL=3 dumpfile=expCASES_%U.dmp logfile=nnsiexp2008_12_28.log & 通配符 %U,它指示文件将按需要创建,格式将为expCASES_nn.dmp,其中nn 从 01 ...

    oracle实验报告

    alter user system default tablespace users01; 8、 创建数据字典 start E:\app\oracle\product\11.1.0\db_1\RDBMS\ADMIN\catalog.sql 9、创建package 包 start E:\app\oracle\product\11.1.0\db_1\RDBMS\...

    sqlmap (懂的入)

    dump tables entries, dump the entire DBMS, retrieve an arbitrary file content (if the remote DBMS is MySQL) and provide your own SQL SELECT statement to be evaluated; * It is possible to make ...

    Oracle ORA 07445 evaopn2()+128错误问题的解决方案

    问题描述 Plsql developer执行一段sql报错: 经查alert log详细报错信息为: ORA-07445: exception encountered: core dump [evaopn2()+128] ...alter system set "_complex_view_merging"=false scope=both; 2、使

    oracle truncate恢复

    SQL> alter system checkpoint; 系统已更改。 22=================================完善字典文件格式如下 control.txt文件中的数据格式为: 表空间号 文件号 相对文件号 文件名 块大小 是否大文件表空间 每列之间用...

    Oracle 主要配置文件介绍

    core_dump_dest指定Oracle运行所产生的core dump 信息的文件的存放路径 background_dump_dest = /u02/app/oracle/admin/cams/bdump core_dump_dest = /u02/app/oracle/admin/cams/cdump user_dump_...

    Oracle9i的init.ora参数中文说明

    Oracle9i初始化参数中文说明 Blank_trimming: 说明: 如果值为TRUE, 即使源长度比目标长度 (SQL92 兼容) 更长, 也允许分配数据。 值范围: TRUE | FALSE 默认值: FALSE serializable: 说明: 确定查询是否获取表级...

    ORACLE9i_优化设计与系统调整

    §14.4.3 ALTER SESSION语句的OPTIMIZER_GOAL参数 174 §14.4.4 关于提示的改变目标 174 §14.5 基于代价优化器(CBO) 174 §14.5.1 CBO结构调整 175 §14.5.2 CBO需求 175 §14.5.3 使用CBO 176 §14.5.4 CBO访问...

    精通websphere MQ

    目录.................................................................................................................................2 内容提要...........................................................

Global site tag (gtag.js) - Google Analytics