从 ASM 中删除归档日志遇 ORA-15028 错误
ORA-15032: not all alterations performedORA-15028: ASM file
今天一8点跑去中金校验数据,发现近期库(AIX6.1下4节点11gR2 RAC)的归档满了,数据库hang住,跑去问提前到的中间件的哥们,结果来了一句没发现什么异常……
心凉了一截,这他妈我要是晚来一会,准出事啊,纳税人还不得急死……二话不说赶紧去先清清再说,切换到grid用户下,通过 asmcmd 用 os 命令连删除了两个文件夹
结果删到第二个文件夹时,突然报错:
ORA-15032: not all alterations performed
ORA-15028: ASM file '+FRA/bjschxcx/……' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
ls 命令核查,发现只有一个文件未删除,数据库已经从 hang 机状态恢复了,尝试用 RMAN 删除,仍然报如下错误:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on default channel at 06/08/2012 13:20:35
ORA-15028: ASM file '+FRA/bjschxcx/……' not dropped; currently being accessed
我要删除的归档是好几天钱的了,当前按道理应该没有使用才对,即便是近期库上配置了好几家厂商的 GoldenGate 实例,数据库在释放一点归档空间后虽然成功
起来了,但是这个问题不解决也不是个事,我在几家厂商的 GoldenGate 实例上查了一下,都未用到我要删除的归档日志,而且进程都没有延迟。
查阅了下 metalink ,有 2、3 篇文章对此现象有描述
其中一篇描述如下,肯定不符合我这里遇到的场景,首先排除、
Cause
The issue can be caused by any replication process running or hanging, holding this file.
For example a Golden Gate replication or shareplex replication process.
Solution
Stop the replication process and try deleting the file uisng rman or ASMCMD.
另外两篇如下:
Cause: An attempt was made to drop an ASM file, but the file was being
accessed by one or more database instances and therefore could not
be dropped.
Action: Shut down all database instances that might be accessing this
file and then retry the drop command.
Solution
Use the following to quickly find out which database instance holds the lock and to identify for restart:
ASMCMD [+] > lsof -G DG_ARCH
DB_Name Instance_Name Path
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_1_seq_72711.5178.785032231
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_1_seq_72720.4818.785040307
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_1_seq_72727.4616.785046605
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_1_seq_72730.4479.785049261
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_1_seq_72742.4395.785059089
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_2_seq_70382.2308.785047531
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_2_seq_70385.1835.785050225
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_2_seq_70402.3091.785064485
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_2_seq_70408.1211.785069875
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_2_seq_70410.4439.785071661
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_3_seq_67973.4354.785051059
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_3_seq_67974.2051.785051959
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_3_seq_67995.1876.785069891
myprod myprod1 +dg_arch/myprod/archivelog/2012_06_04/thread_6_seq_32158.4060.785046539
myprod myprod1 +dg_arch/myprod/datafile/tbs_hways_master_data_med.1698.750777283
这两篇可能和我这个场景有点像,按照第三篇文章中的例子,我在 asmcmd 中也执行了 lsof -G FRA,但是命令执行后无任何输出
不知道是不是我这里的版本不合适,我所在的环境数据库版本为 11.2.0.3.0,而这篇文章写的我的数据库版本也应该是适用的。
Oracle Server - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.
9点左右的时候,我的另一位同事,准备看看 lsof 命令的帮助信息,,结果真他妈受伤,他直接输入 lsof
结果,上述所示的输出便出现了……
结果是实例 4 锁住了那个归档日志,中午重启节点4后,执行 RMAN 命令便可正常删除归档了
转载请注明出处及原文链接:

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Why do I need SSL/TLS encryption MySQL connection? Because unencrypted connections may cause sensitive data to be intercepted, enabling SSL/TLS can prevent man-in-the-middle attacks and meet compliance requirements; 2. How to configure SSL/TLS for MySQL? You need to generate a certificate and a private key, modify the configuration file to specify the ssl-ca, ssl-cert and ssl-key paths and restart the service; 3. How to force SSL when the client connects? Implemented by specifying REQUIRESSL or REQUIREX509 when creating a user; 4. Details that are easily overlooked in SSL configuration include certificate path permissions, certificate expiration issues, and client configuration requirements.

There are three ways to connect Excel to MySQL database: 1. Use PowerQuery: After installing the MySQLODBC driver, establish connections and import data through Excel's built-in PowerQuery function, and support timed refresh; 2. Use MySQLforExcel plug-in: The official plug-in provides a friendly interface, supports two-way synchronization and table import back to MySQL, and pay attention to version compatibility; 3. Use VBA ADO programming: suitable for advanced users, and achieve flexible connections and queries by writing macro code. Choose the appropriate method according to your needs and technical level. PowerQuery or MySQLforExcel is recommended for daily use, and VBA is better for automated processing.

WhensettingupMySQLtables,choosingtherightdatatypesiscrucialforefficiencyandscalability.1)Understandthedataeachcolumnwillstore—numbers,text,dates,orflags—andchooseaccordingly.2)UseCHARforfixed-lengthdatalikecountrycodesandVARCHARforvariable-lengthdata

To achieve MySQL deployment automation, the key is to use Terraform to define resources, Ansible management configuration, Git for version control, and strengthen security and permission management. 1. Use Terraform to define MySQL instances, such as the version, type, access control and other resource attributes of AWSRDS; 2. Use AnsiblePlaybook to realize detailed configurations such as database user creation, permission settings, etc.; 3. All configuration files are included in Git management, support change tracking and collaborative development; 4. Avoid hard-coded sensitive information, use Vault or AnsibleVault to manage passwords, and set access control and minimum permission principles.

The steps for setting MySQL semi-synchronous replication are as follows: 1. Confirm the version supports and load the plug-in; 2. Turn on and enable semi-synchronous mode; 3. Check the status and operation status; 4. Pay attention to timeout settings, multi-slave library configuration and master-slave switching processing. It is necessary to ensure that MySQL 5.5 and above versions are installed, rpl_semi_sync_master and rpl_semi_sync_slave plugins, enable corresponding parameters in the master and slave library, and configure automatic loading in my.cnf, restart the service after the settings are completed, check the status through SHOWSTATUS, reasonably adjust the timeout time and monitor the plug-in operation.

MySQL error "incorrectstringvalueforcolumn" is usually because the field character set does not support four-byte characters such as emoji. 1. Cause of error: MySQL's utf8 character set only supports three-byte characters and cannot store four-byte emoji; 2. Solution: Change the database, table, fields and connections to utf8mb4 character set; 3. Also check whether the configuration files, temporary tables, application layer encoding and client drivers all support utf8mb4; 4. Alternative solution: If you do not need to support four-byte characters, you can filter special characters such as emoji at the application layer.

To recycle MySQL user permissions using REVOKE, you need to specify the permission type, database, and user by format. 1. Use REVOKEALLPRIVILEGES, GRANTOPTIONFROM'username'@'hostname'; 2. Use REVOKEALLPRIVILEGESONmydb.FROM'username'@'hostname'; 3. Use REVOKEALLPRIVILEGESONmydb.FROM'username'@'hostname'; 3. Use REVOKE permission type ON.*FROM'username'@'hostname'; Note that after execution, it is recommended to refresh the permissions. The scope of the permissions must be consistent with the authorization time, and non-existent permissions cannot be recycled.

Methods that implement Excel pivot table functions similar to MySQL mainly include using CASE or IF statements to combine aggregate functions for row conversion. 1. Use CASEWHEN to realize static row-to-column conversion, which is suitable for situations where column values are known to be converted. New columns are generated for different values and data are summarized through SUM (CASEWHEN...). 2. Generate columns dynamically, suitable for situations where specific values are uncertain. You need to obtain a unique value before constructing a CASE expression. Usually, it is combined with stored procedures or application layer logic to splice and execute SQL strings; 3. Use IF functions to simplify syntax to achieve the same effect as CASE but the writing method is more compact. In actual applications, if the dimension is fixed, the column can be hard-coded directly. If the dimension changes frequently, it is recommended to use scripts or store them.
