• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >oracle > Oracle常用dump命令,记录一下备查。

Oracle常用dump命令,记录一下备查。

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了oracle dump命令,oracle导入dump文件,oracle dumpfile,oracle dump,oracle dump文件等相关知识,希望本文的分享对您有所帮助
一.Memory Dumps

1).Global Area
ALTER SESSION SET EVENTS ‘immediate trace name global_area level n';
1 包含PGA
2 包含SGA
4 包含UGA
8 包含indrect memory

2).Library Cache
ALTER SESSION SET EVENTS ‘immediate trace name library_cache level n';
1 library cache统计信息
2 包含hash table histogram
3 包含object handle
4 包含object结构(Heap 0)

3).Row Cache
ALTER SESSION SET EVENTS ‘immediate trace name row_cache level n';
1 row cache统计信息
2 包含hash table histogram
8 包含object结构

4).Buffers
ALTER SESSION SET EVENTS ‘immediate trace name buffers level n';
1 buffer header
2 level 1 + block header
3 level 2 + block contents
4 level 1 + hash chain
5 level 2 + hash chain
6 level 3 + hash chain
8 level 4 + users/waiters
9 level 5 + users/waiters
10 level 6 + users/waiters

5).Buffer
ALTER SESSION SET EVENTS ‘immediate trace name buffer level n';
n为某个指定block的rdba,该命令可以转储某个block在buffer中的所有版本。

6).Heap
ALTER SESSION SET EVENTS ‘immediate trace name heapdump level level';
1 PGA摘要
2 SGA摘要
4 UGA摘要
8 Current call(CGA)摘要
16 User call(CGA)摘要
32 Large call(LGA)摘要
1025 PGA内容
2050 SGA内容
4100 UGA内容
8200 Current call内容
16400 User call内容
32800 Large call内容

7).Sub Heap
Oracle 9.0.1版本之前
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n';
若n为subheap的地址,转储的是subheap的摘要信息
若n为subheap的地址+1,转储的则是subheap的内容
Oracle 9.2.0版本之后
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n, addr m';
其中m为subheap的地址
n为1转储subheap的摘要,n为2转储subheap的内容

8).Process State
ALTER SESSION SET EVENTS ‘immediate trace name processstate level n';

9).System State
ALTER SESSION SET EVENTS ‘immediate trace name systemstate level n';

10).Error State
ALTER SESSION SET EVENTS ‘immediate trace name errorstack level n';
0 Error stack
1 level 0 + function call stack
2 level 1 + process state
3 level 2 + context area
11).Hang Analysis
ALTER SESSION SET EVENTS ‘immediate trace name hanganalyze level n';

12).Work Area
ALTER SESSION SET EVENTS ‘immediate trace name workareatab_dump level n';
1 SGA信息
2 Workarea Table摘要信息
3 Workarea Table详细信息

13).Latches
ALTER SESSION SET EVENTS ‘immediate trace name latches level n';
1 latch信息
2 统计信息

14).Events
ALTER SESSION SET EVENTS ‘immediate trace name events level n';
1 session
2 process
3 system

15).Locks
ALTER SESSION SET EVENTS ‘immediate trace name locks level n';

16).Shared Server Process
ALTER SESSION SET EVENTS ‘immediate trace name shared_server_state level n';
n取值为1~14

17).Background Messages
ALTER SESSION SET EVENTS ‘immediate trace name bg_messages level n';
n为pid+1

二.File Dumps

1).Block
Oracle 7之前
ALTER SESSION SET EVENTS ‘immediate trace name blockdump level n';
n为block的rdba
Oracle8以后
ALTER SYSTEM DUMP DATAFILE file# BLOCK block#;
ALTER SYSTEM DUMP DATAFILE file#
BLOCK MIN minimum_block#
BLOCK MAX maximum_block#;

2).Tree Dump
ALTER SESSION SET EVENTS ‘immediate trace name treedump level n';
n为object_id

3).Undo Segment Header
ALTER SYSTEM DUMP UNDO_HEADER 'segment_name';

4).Undo for a Transaction
ALTER SYSTEM DUMP UNDO BLOCK 'segment_name' XID xidusn xidslot xidsqn;

5).File Header
ALTER SESSION SET EVENTS ‘immediate trace name file_hdrs level n';
1 控制文件中的文件头信息
2 level 1 + 文件头信息
3 level 2 + 数据文件头信息
10 level 3

6).Control file
ALTER SESSION SET EVENTS ‘immediate trace name controlf level n';
1 文件头信息
2 level 1 + 数据库信息 + 检查点信息
3 level 2 + 可重用节信息
10 level 3

7).Redo log Header
ALTER SESSION SET EVENTS ‘immediate trace name redohdr level n';
1 控制文件中的redo log信息
2 level 1 + 文件头信息
3 level 2 + 日志文件头信息
10 level 3

8).Redo log
ALTER SYSTEM DUMP LOGFILE ‘FileName';
ALTER SYSTEM DUMP LOGFILE ‘FileName'
SCN MIN MinimumSCN
SCN MAX MaximumSCN
TIME MIN MinimumTime
TIME MAX MaximumTime
LAYER Layer
OPCODE Opcode
DBA MIN FileNumber . BlockNumber
DBA MAX FileNumber . BlockNumber
RBA MIN LogFileSequenceNumber . BlockNumber
RBA MAX LogFileSequenceNumber . BlockNumber;
其中time = (((((yyyy - 1988)) * 12 + mm - 1) * 31 + dd - 1) * 24 + hh) * 60 + mi) * 60 + ss;

9).Loghist
ALTER SESSION SET EVENTS ‘immediate trace name loghist level n';
1 dump控制文件中最早和最迟的日志历史项
1 dump 2^n个日志历史项
</div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Oracle常用dump命令,记录一下备查。

相关文章

  • 2017-05-11Oracle开发之分析函数(Top/Bottom N、First/Last、NTile)
  • 2017-05-11ORA-12514及ORA-28547错误解决方案
  • 2017-05-11Oracle 系统变量函数介绍
  • 2017-05-11ORACLE 12C PDB 维护基础知识介绍
  • 2017-05-11理解和使用Oracle 8i分析工具LogMiner
  • 2017-05-11oracle查看字符集和修改字符集使用详解
  • 2017-05-11oracle11gR2使用exp导出命令时报EXP-00011错误的解决方法
  • 2017-05-11Oracle 11g服务器与客户端卸载、安装全过程
  • 2017-05-11oracle中如何获得数据库的DBID信息
  • 2017-05-11安装oracle11g INS-30131执行安装程序验证所需的初始设置失败的解决方法

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • ORACLE时间函数(SYSDATE)深入理解
    • oracle 查询表名以及表的列名
    • ORCLE 表中列的修改
    • Oracle知识整理笔记
    • Oracle9iPL/SQL编程的经验小结
    • 基于ORA-12170 TNS 连接超时解决办法详解
    • Oracle数据库处理多媒体信息
    • 索引在Oracle中的应用深入分析
    • Oracle 游标使用全解
    • oracle 使用递归的性能提示测试对比

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有