Database Hangs: What to collect for support
来源:互联网 发布:文都网络 编辑:程序博客网 时间:2024/05/21 17:27
我们经常会遇到数据库hang的情况,很多工程师都无从下手,我把oracle的一篇文章给大家共享出来,大家如果遇到这种问题,可以按照这个文章的思路去解决。
Applies to:
Oracle Server - Enterprise Edition - Version:9.0.0 to 12.2
Information in this document applies to any platform.
Goal
Provide information on what to collect fora situation where the database appears to hang.
Solution
If the Database Appears to 'hang' Pleaseprovide the following information:
A. 2Hanganalyze and 2 Systemstate dumps.
B. Provide snapshots of database performance
C. Provide an up to date RDA.
A. 2 Hanganalyze and 2 Systemstatedumps.
Hanganalyze will confirm if the db is really hung or just slow.
Systemstate dump shows what each process on the database is doing.
* Beware of taking systemstates on very large systems with large numbers ofprocess.
Systemstates can be very slow and the trace file can be very large.
Using SQL*Plus connect as SYSDBA using the following command:
sqlplus " / as sysdba"
Do this 2 times in 2 separate windows,creating 2 sqlplus sessions (SQL1 and SQL2)
In SQL1 gather the hanganalyze by executing the following:
SQL1> oradebug setmypid SQL1> oradebug unlimit; SQL1> oradebug hanganalyze 3
In SQL2 gather the systemstates byexecuting the following:
SQL2> oradebug setmypid SQL2> oradebug unlimit; SQL2> oradebug dump systemstate 266
Gather a second hang analyze having waitedat least 1 minute to give time to identify process state changes. In SQL1execute the following:
SQL1> oradebug hanganalyze 3In SQL2 execute the following to collect a second systemstate dump:
SQL3> oradebug setmypid SQL3> oradebug unlimit; SQL3> oradebug dump systemstate 266If you are usingsystemstate level 266 and it is taking much longer than expected to generatethe dump file, then end this systemstate dump and try level 258.
If connection to the system is not possible in any form, then please refer tothe following article which describes how to collect systemstates in thatsituation:
B. Provide snapshots of database performance
Use statspack, or AWR (if licensed to use it).
Take snapshots avery 15 minutes to an hour interval, depending on the time ofthe hang. When the database hangs, the snapshots can be used to determinewhat load on the database in the build up to the problem.
C. Provide an up to date RDA.
An up to date current RDA provides a lot of additional information about theconfiguration of the database and performance metrics.
See the following note on metalink:
- Database Hangs: What to collect for support
- Database Hangs: What to collect for support
- How to Collect Diagnostics for Database Hanging Issues (文档 ID 452358.1)
- What To Do and Not To Do When 'shutdown immediate' Hangs [ID 375935.1]
- sqlalchemy Support for the MySQL database
- What causes Notes database indexes to rebuild?
- How To Collect 10046 Trace (SQL_TRACE) Diagnostics for Performance Issues
- How to Collect Bne Log Files for GL Integrators
- FAQ:What support is there for creating custom text editors?
- Unicode database support in Tiburon for Delphi and C++
- Telerik RadScheduler - Zero Code to Support DataBase Source CRUD + reminder
- how to build a database that support high parallel traffics
- what to do for the future?
- What to Look for in vmstat
- SET NEWNAME FOR DATABASE TO恢复数据库
- What Is The Maximum Tablespace Size And Database Limit For An Oracle Database ? (文档 ID 1372905.1)
- SolrCore 'collection1' is not available due to init failure: Index locked for write for core collect
- How to collect explorer
- Qt之自定义界面(实现无边框、拖动至任务栏之上)
- 01-RabbitMQ开篇 Hello World
- 博文总目录
- 某银行数据插入慢问题分析过程
- 深度学习助力前端开发:自动生成GUI图代码(附试用地址)
- Database Hangs: What to collect for support
- Python数字和表达式
- 理解c++语言的重载、覆盖和隐藏
- aix下 maxperm设置引起数据库性能问题
- Determining Oracle memory usage on AIX
- MIME type类型
- ABAP 7.4 新语法-内嵌生命和内表操作
- Diagnosing Oracle memory on HP using GLANCE
- 排序之----冒泡,直接插入,选择排序