Home Database Mysql Tutorial redolog大量生成的诊断处理流程

redolog大量生成的诊断处理流程

Jun 07, 2016 pm 04:10 PM
redolog deal with Archive process generate get diagnosis

1.获得归档日志暴增时段的一个归档日志:可以查询v$archived_log视图,结合completion_time列进行定位 2.对该归档日志进行转储dump ALTER SYSTEM DUMP LOGFILE /u01/oracle/V7323/dbs/arch1_76.dbf; --请将路径修改成当时的redo归档的路径 以上命令会在user_


1.获得归档日志暴增时段的一个归档日志:可以查询v$archived_log视图,结合completion_time列进行定位
2.对该归档日志进行转储dump
  ALTER SYSTEM DUMP LOGFILE '/u01/oracle/V7323/dbs/arch1_76.dbf'; 
Copy after login
--请将路径修改成当时的redo归档的路径

以上命令会在user_dump_dest中生成一个trace文件,请将该trace文件传到linux中(root用户or oracle用户均可)

3.
[root@hosta ~]# grep -A2 "^REDO RECORD" his_ora_29032886_dump_arch.trc > redo.log 
Copy after login
4.
[root@hosta ~]# grep OBJ: redo.log |awk -F "OBJ:" '{print $2}'|awk '{print $1}'|sort -n|uniq -c |sort -n -r
2038012 4294967295  <----出现了2038012次。
    107 60635
     60 60464
     30 59848
     29 62992
     29 60669
      9 59810
      8 60706
      8 59842
Copy after login
OBJ:4294967295,这个是undo的redo记录,出现了2038012次,也就是说:产生redo最多的为undo操作
[root@hosta ~]# grep OBJ: redo.log |awk -F "OBJ:" &#39;{print $2}&#39; | more
4294967295 SCN:0x0001.96090e1b SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e1e SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e1f SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e20 SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e21 SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e22 SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e23 SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e24 SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e25 SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e26 SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e27 SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e28 SEQ:  1 OP:5.4
4294967295 SCN:0x0001.96090e29 SEQ:  1 OP:5.2
4294967295 SCN:0x0001.96090e29 SEQ:  2 OP:5.4
Copy after login

注意上面的最后一列:op,这是操作的标志码

OP:5.2 Undo Header
OP:5.4 Commit
Copy after login

5.
[root@hosta ~]# grep -A2 "^CHANGE #" his_ora_29032886_dump_arch.trc > redo_c.log 
Copy after login
6.
[root@hosta ~]# grep OBJ: redo_c.log |awk -F "OBJ:" &#39;{print $2}&#39;|awk &#39;{print $1}&#39;|sort -n|uniq -c |sort -n -r
Copy after login
---这是对object_id按照出现的次数进行倒序排列,举例:
[root@hosta ~]# grep OBJ: redo_c.log |awk -F "OBJ:" &#39;{print $2}&#39;|awk &#39;{print $1}&#39;|sort -n|uniq -c |sort -n -r
3057384 4294967295
1018128 15
    279 60669
    174 60635
Copy after login
这是说明:OBJ:4294967295 出现了3057384次;
OBJ:15 出现了1018128次。
OBJ:4294967295,这个是undo的redo记录.
OBJ:15,可以用如下的语句查询出来:select object_name from dba_objects where object_id='15';
以上就可以定位到是哪个object_name 导致的redo log暴增。

下面来确认一下,是何种操作导致的redo log暴增:
[root@hosta ~]# grep OBJ: redo_c.log | more
CHANGE #1 TYP:0 CLS:15 AFN:1 DBA:0x00400009 OBJ:4294967295 SCN:0x0001.96090e1b SEQ:  1 OP:5.2
CHANGE #2 TYP:0 CLS:16 AFN:1 DBA:0x0040000a OBJ:4294967295 SCN:0x0001.96090e1a SEQ:  1 OP:5.1
CHANGE #3 TYP:2 CLS: 1 AFN:1 DBA:0x0040006a OBJ:15 SCN:0x0001.96090e1b SEQ:  1 OP:11.5
CHANGE #1 TYP:0 CLS:15 AFN:1 DBA:0x00400009 OBJ:4294967295 SCN:0x0001.96090e1e SEQ:  1 OP:5.4
CHANGE #1 TYP:0 CLS:15 AFN:1 DBA:0x00400009 OBJ:4294967295 SCN:0x0001.96090e1f SEQ:  1 OP:5.2
CHANGE #2 TYP:0 CLS:16 AFN:1 DBA:0x0040000a OBJ:4294967295 SCN:0x0001.96090e1e SEQ:  1 OP:5.1
CHANGE #3 TYP:2 CLS: 1 AFN:1 DBA:0x0040006a OBJ:15 SCN:0x0001.96090e1f SEQ:  1 OP:11.5
CHANGE #1 TYP:0 CLS:15 AFN:1 DBA:0x00400009 OBJ:4294967295 SCN:0x0001.96090e20 SEQ:  1 OP:5.4
CHANGE #1 TYP:0 CLS:15 AFN:1 DBA:0x00400009 OBJ:4294967295 SCN:0x0001.96090e21 SEQ:  1 OP:5.2
CHANGE #2 TYP:0 CLS:16 AFN:1 DBA:0x0040000a OBJ:4294967295 SCN:0x0001.96090e20 SEQ:  1 OP:5.1
CHANGE #3 TYP:2 CLS: 1 AFN:1 DBA:0x0040006a OBJ:15 SCN:0x0001.96090e21 SEQ:  1 OP:11.5
Copy after login

注意上面的最后一列:op,这是操作的标志码

OP:5.1 Undo Recorder
OP:5.2 Undo Header
OP:5.4 Commit
OP:11.5 Update Row Piece,也就是update操作,根据obj:15,就能确认是哪个对象上的update
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to split or merge RAR files in Windows 11 How to split or merge RAR files in Windows 11 Feb 18, 2024 pm 05:48 PM

On Windows 11/10 PC, you can use various file compression/archiving software to split or merge RAR files. These software provide convenient features that can help you merge or split RAR files for better file management and organization. Not only can individual files or collections of files be combined into a compressed archive, but files and folders can also be manipulated within compressed archives. Therefore, using file archiving software allows you to manage compressed files more effectively and improve work efficiency. How to split or merge RAR files in Windows 11 To split or merge RAR files in Windows 11/10, you can use WinRAR, a popular Windows file compression/archiving software. Win

The operation process of WIN10 service host occupying too much CPU The operation process of WIN10 service host occupying too much CPU Mar 27, 2024 pm 02:41 PM

1. First, we right-click the blank space of the taskbar and select the [Task Manager] option, or right-click the start logo, and then select the [Task Manager] option. 2. In the opened Task Manager interface, we click the [Services] tab on the far right. 3. In the opened [Service] tab, click the [Open Service] option below. 4. In the [Services] window that opens, right-click the [InternetConnectionSharing(ICS)] service, and then select the [Properties] option. 5. In the properties window that opens, change [Open with] to [Disabled], click [Apply] and then click [OK]. 6. Click the start logo, then click the shutdown button, select [Restart], and complete the computer restart.

Comprehensive Guide to PHP 500 Errors: Causes, Diagnosis and Fixes Comprehensive Guide to PHP 500 Errors: Causes, Diagnosis and Fixes Mar 22, 2024 pm 12:45 PM

A Comprehensive Guide to PHP 500 Errors: Causes, Diagnosis, and Fixes During PHP development, we often encounter errors with HTTP status code 500. This error is usually called &quot;500InternalServerError&quot;, which means that some unknown errors occurred while processing the request on the server side. In this article, we will explore the common causes of PHP500 errors, how to diagnose them, and how to fix them, and provide specific code examples for reference. Common causes of 1.500 errors 1.

How to open multiple Toutiao accounts? What is the process for applying for a Toutiao account? How to open multiple Toutiao accounts? What is the process for applying for a Toutiao account? Mar 22, 2024 am 11:00 AM

With the popularity of mobile Internet, Toutiao has become one of the most popular news information platforms in my country. Many users hope to have multiple accounts on the Toutiao platform to meet different needs. So, how to open multiple Toutiao accounts? This article will introduce in detail the method and application process of opening multiple Toutiao accounts. 1. How to open multiple Toutiao accounts? The method of opening multiple Toutiao accounts is as follows: On the Toutiao platform, users can register accounts through different mobile phone numbers. Each mobile phone number can only register one Toutiao account, which means that users can use multiple mobile phone numbers to register multiple accounts. 2. Email registration: Use different email addresses to register a Toutiao account. Similar to mobile phone number registration, each email address can also register a Toutiao account. 3. Log in with third-party account

How to get the Crimson Abyss of War Double Pamish Lucia How to get the Crimson Abyss of War Double Pamish Lucia Mar 25, 2024 pm 05:31 PM

Players can obtain Lucia's Crimson Abyss when playing in Battle Double Pamish. Many players don't know how to obtain Lucia's Crimson Abyss. Players can obtain it through research and development, or redeem it at the Phantom Pain Cage store. How to obtain R&amp;D for Battle Double Pamish Lucia Crimson Abyss 1. Players can obtain it by drawing from the R&amp;D system, which includes the base card pool, the theme limited card pool and the destiny limited card pool. 2. Revealed in these card pools The basic drop rate of Sia Crimson Abyss is 1.50%, but if the player draws Lucia Crimson Abyss from the card pool, the drop rate will increase to 1.90%. Redemption in the Phantom Pain Cage Store 1. Players can redeem fragments of Lucia Crimson Abyss by using Phantom Pain Scars in the Phantom Pain Cage Store. 2. You can redeem up to 30 fragments every week.

How to obtain administrator rights in Win11 system How to obtain administrator rights in Win11 system Mar 08, 2024 pm 10:00 PM

It is very important to obtain administrator rights in the Win11 system, because administrator rights allow users to perform various operations in the system, such as installing software, modifying system settings, etc. Obtaining administrator rights in Win11 system can be achieved through the following methods: The first method is through user account control settings. In the Win11 system, User Account Control is a function used to manage user permissions. Through it, users can adjust their permission levels. To obtain administrator rights, users can enter the "Settings" interface and select "

How to get Eldon's Ring Torret How to get Eldon's Ring Torret Mar 11, 2024 am 11:40 AM

Torret is the spirit horse in the game Elden's Circle. Many players don't know how to obtain Torret of Elden's Circle. To summon Torret, players need to obtain the spirit horse whistle, which is equipped in the shortcut bar. After that, use the shortcut keys to summon the spirit horse Torret. How to obtain Torret of Eldon's Ring? Answer: You need to obtain the Whistle of the Spirit Horse. 1. Players need to obtain the Spirit Horse Whistle to summon Torret. 2. Players go from the novice birth point to the blessing point in front of the Storm Road, sit down by the campfire, and the heroine [Melina] will appear, and she will give you a [Spirit Horse Whistle] ring. 3. After players equip the "Spirit Horse Whistle" to the shortcut bar and then use the Spirit Horse Whistle, they can summon the soul of Thoret's horse. 4. After riding the spirit horse Torret, you can perform a double jump. You can jump while walking but cannot jump.

Learn how to handle special characters and convert single quotes in PHP Learn how to handle special characters and convert single quotes in PHP Mar 27, 2024 pm 12:39 PM

In the process of PHP development, dealing with special characters is a common problem, especially in string processing, special characters are often escaped. Among them, converting special characters into single quotes is a relatively common requirement, because in PHP, single quotes are a common way to wrap strings. In this article, we will explain how to handle special character conversion single quotes in PHP and provide specific code examples. In PHP, special characters include but are not limited to single quotes ('), double quotes ("), backslash (), etc. In strings

See all articles